|
a command line
free external tools,
java sources
cpp sources
articles
|
- download the free swiss file knife base from sourceforge. - unpack the tool using winzip or unzip. - open the Windows Command Line or a Linux shell.
sfk hexdump [-showle] [-wide] [...] dir .ext1 .ext2 .ext3
create human-readable hexdump of binary file(s).
options:
-showle highlights line ending characters CR and LF.
-wide dumps 32 input bytes per line.
-lean dumps 16 input bytes per line.
-nofile or -nofilenames does not list the filename(s).
-pure lists flat hex characters:
53464B2D544553540D0A
-hexsrc lists hex comma separated values:
0x53,0x46,0x4B,0x2D,0x54,0x45,0x53,0x54,0x0D,0x0A,
-decsrc lists decimal comma separated values:
83,70,75,45,84,69,83,84,13,10,
-offlen n1 n2 dump from offset n1 only n2 bytes.
-notrail no trailing comma "," at end of hex/dec src
-norectrail no trailing comma at end of every src record
-recsize n only with -hex/decsrc, -pure or -flat:
change no. of input bytes dumped per record.
with default output format, use -wide instead.
examples:
sfk hexdump -offlen 4221566976 96 part1.avi
dumps 96 bytes from offset 4221566976 within part1.avi
sfk hexdump -offlen 0xFBA00000 0x60 part1.avi
the same as above, but using hexadecimal numbers
example:
check if a script file contains just UNIX LF line endings,
or DOS CR/LF format:
sfk hexdump -showle thescript.bat
>6364202E 2E0A726D 202D7266 20746D70< cd ...rm -rf tmp 00000000
>2D73656C 66746573 740A6D6B 64697220< -selftest.mkdir 00000010
>746D702D 73656C66 74657374 0A636420< tmp-selftest.cd 00000020
>746D702D 73656C66 74657374 0A637020< tmp-selftest.cp 00000030
>2D52202E 2E2F7465 73746669 6C657320< -R ../testfiles 00000040
>74657374 66696C65 730A0A65 78706F72< testfiles..expor 00000050
>74205443 4D443D22 636D7020 2E2E2F73< t TCMD="cmp ../s 00000060
>63726970 74732F31 302D7366 6B2D7365< cripts/10-sfk-se 00000070
>6C667465 73742D64 622E7478 74220A0A< lftest-db.txt".. 00000080
>2E202E2E 2F736372 69707473 2F31322D< . ../scripts/12- 00000090
>7375622D 74657374 2D75782E 6261740A< sub-test-ux.bat. 000000a0
>0A636420 2E2E2F73 63726970 74730A< .cd ../scripts. 000000b0
the result shows that the script is in UNIX format (just LF 0x0A,
no CR/LF 0x0D0A).
see also:
sfk hextobin - converting hex text to binary.
sfk is a free open-source tool, running instantly without installation efforts. no DLL's, no registry changes - just get sfk.exe from the zip package and use it (binaries for windows, linux and mac are included). read more about all sfk functions here.
|
|