Ajuda no código
Olá, estou aqui para pedir uma ajuda muito importante para mim.
Estou querendo acrescentar algumas assinaturas no programa mas eu sou leigo na linguagem
Existe um .pdf de demonstração http://www.file-recovery.com/downloads/filerecovery.pdf
Em resumo o código demonstrativo é esse:
; ===========================================================================================================
; Signature Templates Usage
; ===========================================================================================================
; Empty lines and lines starting with semicolon are ignored
; Sections order and lines order in sections are not important
; Letter case is not important (excepting RegExp fields)
; -----------------------------------------------------------------------------------------------------------
; Section TEMPLATES - required and contains fields numbering from one
; - TEMPLATE### - points to the section where signature template is described
; -----------------------------------------------------------------------------------------------------------
; Section Template Header - required and contains fields:
; - BEGIN - required. Points to the section describing begin of the signature file
; - FOOTER - required. Points to the section describing end of the signature file
; - MAX_SIZE - non-required. Maximum file size to force file-end, if no file-end signature is detected. By default it is 64Kb.
; - GROUP - non required. If missed - template goes to User Defined templates group by default
; - DESCRIPTION - non required. This is a descriptive name of user template being displayed on a screen
; - EXTENSION - non required. This is a file extension to be displayed on a screen.
;
; -----------------------------------------------------------------------------------------------------------
; Section describing file beginning (required), contains fields of the same type:
;
; signature = offset_start | offset_end
;
; signature - expression (regular or RegExp-compatible). Expression max length is 1024 bytes.
; offset_start - acceptable minimal signature offset from the beginning of the file
; offset_end - acceptable maximum signature offset from the beginning of the file
;
; If there are several fields listed in signature beginning, logical AND operation applied to confirm file start.
;
; -----------------------------------------------------------------------------------------------------------
; Section describing file end (not required), contains fields of the same type:
;
; signature [= bytes_to_append]
;
; signature - expression (regular or RegExp-compatible). Expression max length is 1024 bytes.
; bytes_to_append - not required. How many bytes to append to the file after the signature is found
;
; If there are several fields listed in signature beginning, logical OR operation applied to define file end.
; ===========================================================================================================
; Examples
; ===========================================================================================================
[TEMPLATES]
TEMPLATE1 = PRIMITIVE_HTML
TEMPLATE2 = PRIMITIVE_JPG
[PRIMITIVE_HTML]
DESCRIPTION = Primitive HTML Signature
EXTENSION = html
BEGIN=HTML_BEGIN
FOOTER=HTML_FOOTER
MAX_SIZE = 655360
[HTML_BEGIN]
<html = 0 | 512
<head = 0 | 1024
[HTML_FOOTER]
</html> = 2
[PRIMITIVE_JPG]
BEGIN=BEGIN.TEST.JPG
GROUP = Images and Camera RAW files
DESCRIPTION = Primitive JPG files
FOOTER=FOOTER-.TEST.JPG
EXTENSION = test.jpg
MAX_SIZE = 3221225472
[BEGIN.TEST.JPG]
\xFF\xD8\xFF = 0 | 0
[FOOTER-.TEST.JPG]
\xFF\xD9
Gostaria de saber como acrescentar extensões "txt" & "sql", já fiz várias alterações mas sem conhecimento não consigo obter um resultado plausível...
Qualquer ajuda será bem vinda.
Não sei nem o que quer dizer está linha:
\xFF\xD8\xFF = 0 | 0
Discussão (0)
Carregando comentários...