标题: [文件操作] xd - 提取两个十六进制地址之间的字符;查看二进制/十六进制…… [打印本页]
作者: tmplinshi 时间: 2012-11-10 03:31 标题: xd - 提取两个十六进制地址之间的字符;查看二进制/十六进制……
- XD by Jason Hood <jadoxa@yahoo.com.au>.
- Version 1.11 (5 January, 2010). Freeware.
- http://xd.adoxa.cjb.net/
-
- Dump files (or standard input if none) as a series of hexadecimal bytes
- and/or printable characters, or as a set of records. Conversely, turn a
- dump into a file.
-
- Usage: xdw [options|files]
-
- -x Hex dump
- -c Character dump (default is ASCII)
- -a Use an alphanumeric character dump
- -A Dump all printable characters
- -<num> Num bytes per line (default is 16)
- -b Binary dump
- -r<record> Use a record format (up to 20 allowed)
- -~ Reverse the byte order of all types (must precede -r)
- -f Use a "formatted" record file
- -w Write (or update) a binary file from a text file
- -o Turn offset display off (dump) or on (record)
- +[[<offset>]-]<offset> Start and finish file offsets (inclusive)
- ++<line> Begin reading the text file from this line number
- =<count> Number of bytes or records to display
-
- Numbers can be prefixed with 0x for hexadecimal or 0 for octal.
-
- Record format:
- [<count>][-][~][u]<type>[:[0][<width>][.<prec>][e]][;|,|+]...[*<repeat>]
-
- <count> number of times to repeat the type or the maximum length
- of strings. If omitted (or one) for a 'z' string, the length
- of the string itself will be used (variable-length record)
-
- - use signed decimal numbers
- ~ reverse the byte order
- u characters are in Unicode (two bytes)
-
- <type> b - Decimal byte B - Hexadecimal byte
- w - Decimal word (two bytes) W - Hexadecimal word
- t - Decimal triplet (3 bytes) T - Hexadecimal triplet
- l - Decimal long (four bytes) L - Hexadecimal long
- c - Character C - Optionally zero-terminated chars
- z - Zero-terminated string Z - Optionally zero-terminated string
- f - Float (four bytes) p - Byte-length string (Pascal)
- r - Real (six bytes) s - Word-length string
- d - Double (eight bytes) S - Long-length string
- D - Long double (ten bytes) G - Long double (ten+two pad)
- i - Ignore byte
-
- 0 display numbers with leading zeros (default for hex without width)
- <width> minimum number of characters to display the type (default is max.)
- <prec> number of decimals to display (default is three)
- e display floating point numbers with an exponent
-
- ; separate types with a space (can accumulate; default)
- , separate types with a tab (can accumulate)
- + types will not be separated
-
- <repeat> number of times to repeat the entire record
复制代码
示例:
E:\我的文档\桌面\xd111>xdw +0x10-0x100 xd.txt
000010 0a 09 09 09 09 20 65 58 74 65 6e 64 65 64 20 44 ..... eXtended D
000020 75 6d 70 0d 0a 0d 0a 09 09 09 20 43 6f 70 79 72 ump....... Copyr
000030 69 67 68 74 20 4a 61 73 6f 6e 20 48 6f 6f 64 20 ight Jason Hood
000040 32 30 30 33 2d 32 30 31 30 0d 0a 0d 0a 09 09 09 2003-2010.......
000050 20 20 20 20 46 72 65 65 77 61 72 65 2e 20 20 56 Freeware. V
000060 65 72 73 69 6f 6e 20 31 2e 31 31 0d 0a 0d 0a 0d ersion 1.11.....
000070 0a 20 20 20 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d . ===========
000080 0d 0a 20 20 20 20 44 65 73 63 72 69 70 74 69 6f .. Descriptio
000090 6e 0d 0a 20 20 20 20 3d 3d 3d 3d 3d 3d 3d 3d 3d n.. =========
0000a0 3d 3d 0d 0a 0d 0a 20 20 20 20 58 44 20 69 73 20 ==.... XD is
0000b0 61 20 75 74 69 6c 69 74 79 20 74 6f 20 68 65 6c a utility to hel
0000c0 70 20 6d 61 6b 65 20 73 65 6e 73 65 20 6f 66 20 p make sense of
0000d0 61 20 62 69 6e 61 72 79 20 66 69 6c 65 2e 20 20 a binary file.
0000e0 4e 6f 74 20 6f 6e 6c 79 20 64 6f 65 73 20 69 74 Not only does it
0000f0 0d 0a 20 20 20 20 68 61 76 65 20 74 68 65 20 75 .. have the u
000100 73 s
E:\我的文档\桌面\xd111>xdw -b +0x10-0x100 xd.txt
eXtended Dump
Copyright Jason Hood 2003-2010
Freeware. Version 1.11
===========
Description
===========
XD is a utility to help make sense of a binary file. Not only does it
have the us
-----------------------------------------------
官网: http://adoxa.3eeweb.com/index.html
-----------------------------------------------
http://bcn.bathome.net/s/tool/index.html?key=xd
作者: WindCat 时间: 2024-2-6 00:57
- @echo off
- set file=SaveData1.dat
- set params=+4 =8
- set "result="
- for /f "tokens=*" %%a in ('"xd.exe -xo %file% %params%"') do (set "result=%%a")
- set "result_no_spaces=%result: =%"
- echo %result%
- echo %result_no_spaces%
- pause
复制代码
英语渣只弄明白了这样读字节,有人知道怎么写入吗?对于其他功能有人能写几个例子教教怎么用吗?
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |