[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文件操作] xd - 提取两个十六进制地址之间的字符;查看二进制/十六进制……

  1. XD by Jason Hood <jadoxa@yahoo.com.au>.
  2. Version 1.11 (5 January, 2010).  Freeware.
  3. http://xd.adoxa.cjb.net/
  4. Dump files (or standard input if none) as a series of hexadecimal bytes
  5. and/or printable characters, or as a set of records.  Conversely, turn a
  6. dump into a file.
  7. Usage: xdw [options|files]
  8. -x                      Hex dump
  9. -c                      Character dump (default is ASCII)
  10. -a                      Use an alphanumeric character dump
  11. -A                      Dump all printable characters
  12. -<num>                  Num bytes per line (default is 16)
  13. -b                      Binary dump
  14. -r<record>              Use a record format (up to 20 allowed)
  15. -~                      Reverse the byte order of all types (must precede -r)
  16. -f                      Use a "formatted" record file
  17. -w                      Write (or update) a binary file from a text file
  18. -o                      Turn offset display off (dump) or on (record)
  19. +[[<offset>]-]<offset>  Start and finish file offsets (inclusive)
  20. ++<line>                Begin reading the text file from this line number
  21. =<count>                Number of bytes or records to display
  22. Numbers can be prefixed with 0x for hexadecimal or 0 for octal.
  23. Record format:
  24.        [<count>][-][~][u]<type>[:[0][<width>][.<prec>][e]][;|,|+]...[*<repeat>]
  25. <count>   number of times to repeat the type or the maximum length
  26.            of strings.  If omitted (or one) for a 'z' string, the length
  27.            of the string itself will be used (variable-length record)
  28. -         use signed decimal numbers
  29. ~         reverse the byte order
  30. u         characters are in Unicode (two bytes)
  31. <type>    b - Decimal byte                B - Hexadecimal byte
  32.           w - Decimal word (two bytes)    W - Hexadecimal word
  33.           t - Decimal triplet (3 bytes)   T - Hexadecimal triplet
  34.           l - Decimal long (four bytes)   L - Hexadecimal long
  35.           c - Character                   C - Optionally zero-terminated chars
  36.           z - Zero-terminated string      Z - Optionally zero-terminated string
  37.           f - Float (four bytes)          p - Byte-length string (Pascal)
  38.           r - Real (six bytes)            s - Word-length string
  39.           d - Double (eight bytes)        S - Long-length string
  40.           D - Long double (ten bytes)     G - Long double (ten+two pad)
  41.           i - Ignore byte
  42. 0         display numbers with leading zeros (default for hex without width)
  43. <width>   minimum number of characters to display the type (default is max.)
  44. <prec>    number of decimals to display (default is three)
  45. e         display floating point numbers with an exponent
  46. ;         separate types with a space (can accumulate; default)
  47. ,         separate types with a tab (can accumulate)
  48. +         types will not be separated
  49. <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

  1. @echo off
  2. set file=SaveData1.dat
  3. set params=+4 =8
  4. set "result="
  5. for /f "tokens=*" %%a in ('"xd.exe -xo %file% %params%"') do (set "result=%%a")
  6. set "result_no_spaces=%result: =%"
  7. echo %result%
  8. echo %result_no_spaces%
  9. pause
复制代码
英语渣只弄明白了这样读字节,有人知道怎么写入吗?对于其他功能有人能写几个例子教教怎么用吗?

TOP

返回列表