July 19th, 2020, 20:27
July 20th, 2020, 0:13
July 20th, 2020, 2:06
July 20th, 2020, 15:34
July 21st, 2020, 12:50
fzabkar wrote: I think it's best if the program produces a list of files to be deleted rather than actually deleting them.
-BR- wrote:do NOT end with FFFFFFFF <----- here "end" = the very last 4 bytes
July 21st, 2020, 16:49
July 21st, 2020, 17:31
July 21st, 2020, 18:50
fzabkar wrote: Just one question. Can you not specify a custom header and footer search in your data recovery tool?
July 21st, 2020, 18:54
-BR- wrote:fzabkar wrote: Just one question. Can you not specify a custom header and footer search in your data recovery tool?
Not in any that I know of, specially if it´s to consider both footer and header at the same time
Do you know one that can?
July 21st, 2020, 22:25
fzabkar wrote:I have a preliminary version that incorporates your earlier requirements. I'll try to add your latest requirements soon.
fzabkar wrote:Searching for a footer at any place other than the end of the file will make the program run very slowly
July 21st, 2020, 22:52
-BR- wrote:1. Do you think you could implement footer and header hex to allow an OR operator ?
Logical example: if footer = AA or BB or CC
---> in this case would match file if any of the 3 criterias is found
---> or if inverse is set, than would match a file if neither of the 3 criterias is found
July 30th, 2020, 15:32
Usage: SRCHHDFT inf=file_list outf=log/bat_file delete=[now/later] [+/-]hdr=data1/data2/dataN [AND/OR] [+/-]ftr=data1/data2/dataN
This program searches for all files in the file list with matching header and footer.
If "delete=now" is specified, then the matching files are deleted and the results logged to "outf".
If "delete=later" is specified, then the del commands are written to the BATch file specified by "outf".
The header/footer can be any of data1, data2, ... dataN (hexadecimal only).
Both header and footer are optional.
If "+hdr" or "+ftr" is specified, then the header/footer must match one of data1, data2, ... dataN.
If "-hdr" or "-ftr" is specified, then the header/footer must not match any of data1, data2, ... dataN.
Hexadecimal strings must have an even number of characters.
Use a leading 0 if necessary, eg 0ABC.
Examples:
SRCHHDFT inf=DATlist.txt outf=delold.log delete=now hdr=41424344 AND -ftr=ff0123FF
SRCHHDFT inf=DATlist.txt outf=delold.bat delete=later -hdr=012345 OR ftr=ffFFFF/414E44
SRCHHDFT inf="list of files to search.txt" outf="delete bad files.bat" delete=later hdr=424144
A file count is displayed after every 1000 files have been processed.
Type F to print the current file count.
Type Q to save results and quit program.
August 3rd, 2020, 16:23
Usage:
SRCHHDFT inf=file_list outf=log/bat_file delete=[now/later] ftrlen=size_of_footer_block [+/-]hdr=data1/data2/dataN [AND/OR] [+/-]ftr=data1/data2/dataN
This program searches for all files in the file list with matching header and footer.
If "delete=now" is specified, then the matching files are deleted and the results logged to "outf".
If "delete=later" is specified, then the del commands are written to the BATch file specified by "outf".
The header/footer can be any of data1, data2, ... dataN (hexadecimal only).
Both header and footer are optional.
If "+hdr" or "+ftr" is specified, then the header/footer must match one of data1, data2, ... dataN.
If "-hdr" or "-ftr" is specified, then the header/footer must not match any of data1, data2, ... dataN.
Hexadecimal strings must have an even number of characters.
Use a leading 0 if necessary, eg 0ABC.
Specifying ftrlen = 0 searches for a footer at the end of the file.
Ftrlen = N (decimal) searches for footers in the last N bytes of the file.
Examples:
SRCHHDFT inf=DATlist.txt outf=delold.log delete=now ftrlen=0 hdr=41424344 AND -ftr=ff0123FF
SRCHHDFT inf=DATlist.txt outf=delold.bat delete=later ftrlen=4096 -hdr=012345 OR ftr=ffFFFF/414E44
SRCHHDFT inf="list of files to search.txt" outf="delete bad files.bat" delete=later ftrlen=0 hdr=424144
A file count is displayed after every 1000 files have been processed.
Type F to print the current file count.
Type Q to save results and quit program.
September 1st, 2020, 14:37
Usage:
SRCHHDFT inf=file_list outf=log/bat/list_file delete=[now/later/list] hdrlen=size_of_header_block ftrlen=size_of_footer_block [+/-]hdr=data1/data2/dataN [AND/OR] [+/-]ftr=data1/data2/dataN
This program searches for all files in the file list with matching header and footer.
If "delete=now" is specified, then the matching files are deleted and the results logged to "outf".
If "delete=later" is specified, then the del commands are written to the BATch file specified by "outf".
If "delete=list" is specified, then the file specs are written to the list file specified by "outf".
The header/footer can be any of data1, data2, ... dataN (hexadecimal only).
Both header and footer are optional.
If "+hdr" or "+ftr" is specified, then the header/footer must match one of data1, data2, ... dataN.
If "-hdr" or "-ftr" is specified, then the header/footer must not match any of data1, data2, ... dataN.
Hexadecimal strings must have an even number of characters.
Use a leading 0 if necessary, eg 0ABC.
Specifying hdrlen = 0 searches for a header at the start of the file.
Hdrlen = N (decimal) searches for headers in the first N bytes of the file.
Specifying ftrlen = 0 searches for a footer at the end of the file.
Ftrlen = N (decimal) searches for footers in the last N bytes of the file.
Examples:
SRCHHDFT inf=DATlist.txt outf=delold.log delete=now hdrlen=0 ftrlen=0 hdr=41424344 AND -ftr=ff0123FF
SRCHHDFT inf=DATlist.txt outf=delold.lst delete=list hdrlen=64 ftrlen=4096 -hdr=012345 OR ftr=ffFFFF/414E44
SRCHHDFT inf="list of files to search.txt" outf="delete bad files.bat" delete=later hdrlen=0 ftrlen=0 hdr=424144
A file count is displayed after every 1000 files have been processed.
Type F to print the current file count.
Type Q to save results and quit program.
September 2nd, 2020, 15:32
dir filespec /b /s /a-d
September 2nd, 2020, 16:55
September 6th, 2020, 16:08
September 6th, 2020, 22:30
bgrep
Binary grep with support for sophisticated regexes and grep(1)-like usage.
Usage
bgrep's command-line options mirror those of grep(1) very closely. The main difference is that bgrep operates on hex strings instead of text strings.
Examples:
bgrep -r 'ffd9' /home/user/pictures - find all files with a JPEG header in them
bgrep '00??00' binary - find one-byte strings in a binary
bgrep -C 16 -t hex '09f91102' dvdcss - find instances of a certain encryption key in a program
bgrep -F 'PK' file.zip - find zip entry headers in a zip file
bgrep -E '\0[\x20-\x7e]{1,8}\0' unknown.exe - find printable strings between 1 and 8 chars long in a program (using Python regex syntax)
bgrep -W -w 4 '0000f4ce' input.bin - find the word 0x0000f4ce in little-endian order (ce f4 00 00)
bgrep defaults to displaying binary content in a hexdump format, and even supports colour by default on supported terminals, just like grep.
Installing
As a prerequisite, you will need Python 3, at least 3.2 (higher preferred). After installing that, a simple ...
wget 'https://raw.githubusercontent.com/nneonneo/bgrep/master/bgrep.py' -O /usr/local/bin/bgrep
... will do the trick.
September 6th, 2020, 23:26
September 7th, 2020, 6:50
Powered by phpBB © phpBB Group.