{"id":29,"date":"2012-04-15T07:44:47","date_gmt":"2012-04-14T23:44:47","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=29"},"modified":"2012-04-15T07:44:47","modified_gmt":"2012-04-14T23:44:47","slug":"winhex%e8%84%9a%e6%9c%ac%e7%bc%96%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/29.html","title":{"rendered":"WinHex\u811a\u672c\u7f16\u7a0b"},"content":{"rendered":"<p>\u811a\u672c\u547d\u4ee4\u9002\u7528\u7684\u73af\u5883\u6bd4\u8f83\u591a\u3002\u811a\u672c\u6587\u4ef6\u4e2d\u7684\u6ce8\u91ca\u4ee5\u4e3a\u53cc\u659c\u6760\u5f00\u5934\u3002\u811a\u672c\u652f\u6301\u7684\u6700\u957f255\u5b57\u7b26\u7684\u53c2\u6570\u3002\u6709\u7591\u70b9\u7684\u5730\u65b9\u662f\u5341\u516d\u8fdb\u5236\uff0c\u6587\u672c\u5b57\u7b26\u4e32\uff08\u751a\u81f310\u8fdb\u5236\u6570\u503c\uff09\u90fd\u53ef\u4ee5\u4f5c\u4e3a\u53c2\u6570\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u5f15\u53f7\u5f3a\u5236\u8f6c\u6362\u6570\u5b57\u53c2\u6570\u4e3a\u6587\u672c\u53c2\u6570\u3002\u5982\u679c\u6587\u672c\u6216\u8005\u53d8\u91cf\u540d\u4e2d\u5b58\u5728\u7a7a\u683c\uff0c\u5219\u5f15\u53f7\u662f\u5fc5\u987b\u7684\uff0c\u5728\u5f15\u53f7\u4e2d\u7684\u6240\u6709\u5b57\u7b26\u90fd\u88ab\u88ab\u8bc6\u522b\u6210\u4e00\u4e2a\u53c2\u6570\u800c\u5b58\u5728\u3002<\/p>\n<p>\u5f53\u5728WinHex\u4e2d\u4f7f\u7528\u6570\u5b66\u8868\u8fbe\u5f0f\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u5f15\u7528\u6570\u5b66\u8868\u8fbe\u5f0f\uff0c\u4f46\u662f\u5fc5\u987b\u7528\u62ec\u53f7\u62ec\u8d77\u6765\u3002\u5728\u6570\u5b66\u8868\u8fbe\u5f0f\u4e2d\u4e0d\u80fd\u6709\u7a7a\u683c\u3002\u540c\u6837\u53ef\u4ee5\u5728\u6570\u5b66\u8868\u8fbe\u5f0f\u4e2d\u5e94\u7528\u6570\u5b57\u53d8\u91cf\u3002\u652f\u6301\u7684\u64cd\u4f5c\u6709\uff0c\u52a0\u6cd5\uff08+\uff09\uff0c\u51cf\u6cd5\uff08-\uff09\uff0c\u4e58\u6cd5\uff08*\uff09\uff0c\u6574\u9664\uff08\/\uff09\uff0c\u6a21\u9664\uff08%\uff09\uff0c\u903b\u8f91\u8fd0\u7b97\u7b26AND\uff08&amp;\uff09\uff0cOR\uff08|\uff09\uff0c\u4ee5\u53caXOR\uff08^\uff09\u3002\u4ee5\u4e0b\u662f\u6709\u6548\u7684\u6570\u5b66\u8868\u8fbe\u5f0f\uff1a(5*2+1), (MyVar1\/(MyVar2+4)), or (-MyVar)\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u76ee\u524d\u652f\u6301\u7684\u811a\u672c\u547d\u4ee4\u7684\u8be6\u7ec6\u63cf\u8ff0\u4ee5\u53ca\u4f7f\u7528\u5b9e\u4f8b\u3002<\/p>\n<p>Create \"D:\\My File.txt\" 1000<br \/>\n\u521b\u5efa\u4e00\u4e2a1000\u5b57\u8282\u7684\u65b0\u6587\u4ef6\uff0c\u5982\u679c\u5df2\u7ecf\u5b58\u5728\u540c\u540d\u6587\u4ef6\uff0c\u5219\u5c06\u5176\u8986\u76d6\u3002<\/p>\n<p>Open \"D:\\My File.txt\" <br \/>\nOpen \"D:\\*.txt\" <br \/>\n\u6253\u5f00\u6307\u5b9a\u683c\u5f0f\u7684\u6587\u4ef6\uff0c\u5982\u679c\u901a\u914d\u7b26\u4e3a\u201c?\u201d\u5219WinHex\u4f1a\u8ba9\u7528\u6237\u9009\u62e9\u8981\u6253\u5f00\u7684\u6587\u4ef6\u3002<\/p>\n<p>Open C: <br \/>\nOpen D: <br \/>\n\u6253\u5f00\u6307\u5b9a\u7684\u903b\u8f91\u9a71\u52a8\u5668\u3002\u5982\u679c\u901a\u914d\u7b26\u4e3a\u201c:?\u201d\u5219WinHex\u4f1a\u8ba9\u7528\u6237\u9009\u62e9\u8981\u6253\u5f00\u7684\u903b\u8f91\u9a71\u52a8\u5668\u6216\u8005\u78c1\u76d8\u3002<\/p>\n<p>Open 80h <br \/>\nOpen 81h <br \/>\nOpen 9Eh <br \/>\n\u6253\u5f00\u6307\u5b9a\u7684\u7269\u7406\u4ecb\u8d28\u3002\u8f6f\u76d8\u7684\u4e3a00h\uff0c\u786c\u76d8\u4e0eu\u76d8\u4e3a80h\uff0c\u5149\u76d8\u4e3a9Eh\u3002<br \/>\n\u53ef\u4ee5\u589e\u52a0\u7b2c\u4e8c\u4e2a\u53c2\u6570\u6765\u8bbe\u5b9a\u6587\u4ef6\u6216\u8005\u4ecb\u8d28\u7684\u7f16\u8f91\u6a21\u5f0f\uff08\u201cin-place\u201d\u6216\u8005\u201cread-only\u201d\uff09<\/p>\n<p>CreateBackup<br \/>\n\u4e3a\u6d3b\u52a8\u6587\u4ef6\u7684\u5f53\u524d\u72b6\u6001\u521b\u5efaWHX\u5907\u4efd\u3002<\/p>\n<p>CreateBackupEx 0 100000 650 true \"F:\\My backup.whx\" <br \/>\n\u5907\u4efd\u5f53\u524d\u6d3b\u52a8\u78c1\u76d8\u4e2d\u4ece0\u6247\u533a\u5230100000\u6247\u533a\u7684\u6570\u636e\u3002\u5907\u4efd\u6587\u4ef6\u5c06\u81ea\u52a8\u5206\u5272\u6210650M\u5927\u5c0f\u3002\u5e76\u4e14\u9009\u62e9\u4e86\u538b\u7f29\u9009\u9879\u3002\u8f93\u51fa\u6587\u4ef6\u7684\u8def\u5f84\u4ee5\u53ca\u540d\u79f0\u4f5c\u4e3a\u6700\u540e\u7684\u53c2\u6570\u5199\u5165\u3002<br \/>\n\u5982\u679c\u5907\u4efd\u6587\u4ef6\u4e0d\u9700\u8981\u5206\u5272\uff0c\u5219\u7b2c\u4e09\u4e2a\u53c2\u6570\u7684\u6570\u503c\u8be5\u4e3a0\u5373\u53ef\u3002\u5982\u679c\u4e0d\u542f\u52a8\u538b\u7f29\u529f\u80fd\u5219\u5c06\u201ctrue\u201d\u6539\u4e3a\u201cfalse\u201d\u3002\u5982\u679c\u9700\u8981\u81ea\u52a8\u5206\u914d\u6587\u4ef6\u540d\u4ee5\u53ca\u6587\u4ef6\u8def\u5f84\u5219\u6700\u540e\u7684\u53c2\u6570\u8868\u793a\u4e3a\u201c\"\"\u201d\u5373\u53ef\u3002<\/p>\n<p>Goto 0x128 <br \/>\nGoto MyVariable<br \/>\n\u5c06\u5149\u6807\u7684\u4f4d\u7f6e\u79fb\u52a8\u5230\u504f\u79fb\u91cf0x128\u4f4d\u7f6e\uff0816\u8fdb\u5236\u8868\u793a\uff09\u3002\u540c\u6837\u4e5f\u53ef\u4ee5\u7528\u6570\u5b57\u53d8\u91cf\uff08\u6700\u957f8\u5b57\u8282\uff09\u6765\u5b9a\u4e49\u5149\u6807\u79fb\u52a8\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>Move -100 <br \/>\n\u5c06\u5f53\u524d\u5149\u6807\u7684\u4f4d\u7f6e\u5411\u540e\u79fb\u52a8100\u5b57\u8282\uff0816\u8fdb\u5236\uff09\u3002<\/p>\n<p>Write \"Test\" <br \/>\nWrite 0x0D0A <br \/>\nWrite MyVariable<br \/>\n\u5728\u5149\u6807\u5f53\u524d\u4f4d\u7f6e\uff08\u4ee5\u8986\u76d6\u6a21\u5f0f\uff09\u5199\u5165ASCII\u5b57\u7b26\u201cTest\u201d\u6216\u8005\u4e24\u4e2a\u5b57\u8282\u768416\u8fdb\u5236\u6570\u201c0D0A\u201d\u3002\u8fd9\u91cc\u540c\u6837\u53ef\u4ee5\u5199\u5165\u6570\u5b57\u53d8\u91cf\u4e2d\u7684\u503c\u3002\u540c\u65f6\u5c06\u5149\u6807\u79fb\u52a8\u5230\u88ab\u8986\u76d6\u90e8\u5206\u7684\u540e\u9762\u3002\u5f53\u5230\u8fbe\u6587\u4ef6\u7684\u7ed3\u5c3e\u65f6\uff0c\u5c06\u5728\u6587\u4ef6\u5c3e\u90e8\u6dfb\u52a0\u7a7a\u5b57\u8282\u4ee5\u5b8c\u6210\u64cd\u4f5c\u3002\u4e0b\u4e00\u4e2a\u5199\u547d\u4ee4\u5c06\u4e0d\u4f1a\u5728\u6587\u4ef6\u5c3e\u5df4<\/p>\n<p>Write2<br \/>\n\u548c\u201cWrite\u201d\u7684\u529f\u80fd\u7c7b\u4f3c\uff0c\u5f53\u65f6\u5f53\u5230\u8fbe\u6587\u4ef6\u7ed3\u5c3e\u7684\u65f6\u5019\uff0c\u4e0d\u4f1a\u5728\u6587\u4ef6\u6dfb\u52a0\u7a7a\u5b57\u8282\u3002So it is <br \/>\nnot safe to assume that Write2 always moves the current position forward by the number of bytes <br \/>\nwritten.<\/p>\n<p>Insert \"Test\"<br \/>\n\u529f\u80fd\u4e0e\u201cWrite\u201d\u7c7b\u4f3c\uff0c\u4f46\u662f\u5728\u201cinsert\u201d\u6a21\u5f0f\u53ea\u80fd\u5e94\u7528\u4e8e\u6587\u4ef6\u3002<\/p>\n<p>Read MyVariable 10<br \/>\n\u4ece\u5f53\u524d\u4f4d\u7f6e\u8bfb\u516510\u4e2a\u5b57\u8282\u7684\u6570\u636e\u5230\u201cMyVariable\u201d\u53d8\u91cf\u4e2d\u3002\u5982\u679c\u53d8\u91cf\u4e0d\u5b58\u5728\uff0c\u5b83\u5c06\u4f1a\u521b\u5efa\u4e00\u4e2a\u3002WinHex\u540c\u65f6\u53ef\u4ee5\u652f\u630148\u4e2a\u4e0d\u540c\u7684\u53d8\u91cf\u3002\u53e6\u4e00\u4e2a\u521b\u5efa\u53d8\u91cf\u7684\u547d\u4ee4\u662f\u201cAssign\u201d\u3002<\/p>\n<p>ReadLn MyVariable <br \/>\n\u4ece\u5f53\u524d\u4f4d\u7f6e\u8bfb\u5165\u4e00\u6574\u884c\u7684\u6570\u636e\u5230\u201cMyVariable\u201d\u53d8\u91cf\u4e2d\u76f4\u5230\u9047\u5230\u6362\u884c\u7b26\u3002\u5982\u679c\u53d8\u91cf\u5df2\u7ecf\u5b58\u5728\u4e86\uff0c\u5219\u53d8\u91cf\u7684\u5927\u5c0f\u5c06\u4f1a\u88ab\u4ece\u65b0\u8c03\u6574\u3002<\/p>\n<p>Close<br \/>\n\u4e0d\u4fdd\u5b58\u7684\u5173\u95ed\u5f53\u524d\u6d3b\u52a8\u7a97\u53e3\u3002<\/p>\n<p>CloseAll<br \/>\n\u4e0d\u4fdd\u5b58\u7684\u5173\u95ed\u6240\u6709\u7a97\u53e3\u3002<\/p>\n<p>Save<br \/>\n\u4fdd\u5b58\u5f53\u524d\u6d3b\u52a8\u7a97\u53e3\u4e2d\u6253\u5f00\u7684\u6587\u4ef6\u6216\u78c1\u76d8\u7684\u4fee\u6539\u3002<\/p>\n<p>SaveAs \"C:\\New Name.txt\" <br \/>\n\u5c06\u5f53\u524d\u6d3b\u52a8\u7a97\u53e3\u6253\u5f00\u7684\u6587\u4ef6\u53e6\u5b58\u4e3a\u6307\u5b9a\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u3002\u5982\u679c\u901a\u914d\u7b26\u4e3a\u201c?\u201d\uff0c\u5219WinHex\u4f1a\u8ba9\u7528\u6237\u81ea\u5df1\u9009\u62e9\u4fdd\u5b58\u7684\u8def\u5f84\u4ee5\u53ca\u6587\u4ef6\u540d\u3002<\/p>\n<p>SaveAll<br \/>\n\u4fdd\u5b58\u6240\u6709\u7a97\u53e3\u4e2d\u4fee\u6539\u3002<\/p>\n<p>Terminate <br \/>\n\u4e2d\u65ad\u811a\u672c\u7684\u6267\u884c\u3002<\/p>\n<p>Exit <br \/>\n\u4e2d\u65ad\u811a\u672c\u7684\u6267\u884c\u5e76\u4e14\u5173\u95edWinHex\u3002<\/p>\n<p>ExitIfNoFilesOpen <br \/>\n\u5982\u679c\u5728WinHex\u4e2d\u6ca1\u6709\u6253\u5f00\u7684\u6587\u4ef6\u5c06\u7ec8\u6b62\u811a\u672c\u6587\u4ef6\u7684\u6267\u884c\u3002<\/p>\n<p>Block 100 200 <br \/>\nBlock \"My Variable 1\" \"My Variable 2\"<br \/>\n\u5728\u5f53\u524d\u6d3b\u52a8\u7a97\u53e3\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u504f\u79fb\u91cf\u4ece100\u5230200\u7684\u9009\u5757\uff0810\u8fdb\u5236\uff09\u3002\u4e0b\u4e00\u884c\u547d\u4ee4\u8868\u793a\u5b9a\u4e49\u4ece\u53d8\u91cf\"My Variable 1\"\u5230\"My Variable 2\"\u7684\u9009\u5757\uff08\u6700\u957f8\u5b57\u8282\uff09<\/p>\n<p>Block1 0x100 <br \/>\n\u5728\u504f\u79fb\u91cf0x100\u5904\u5b9a\u4e49\u4e00\u4e2a\u5b57\u8282\u7684\u9009\u5757\u3002\u540c\u6837\u53ef\u4ee5\u4f7f\u7528\u53d8\u91cf\u3002<\/p>\n<p>Block2 0x200<br \/>\n\u5b9a\u4e49\u4e00\u4e2a\u4ece\u5f00\u5934\u5230\u504f\u79fb\u91cf0x200\u90e8\u5206\u7684\u9009\u5757\u3002\u540c\u6837\u53ef\u4ee5\u4f7f\u7528\u53d8\u91cf\u3002<\/p>\n<p>Copy <br \/>\n\u5c06\u5f53\u524d\u9009\u5757\u590d\u5236\u8fdb\u526a\u5207\u677f\u4e2d\u3002\u5982\u679c\u6ca1\u6709\u5b9a\u4e49\u9009\u5757\uff0c\u5176\u529f\u80fd\u548c\u7f16\u8f91\u83dc\u5355\u4e2d\u7684\u590d\u5236\u547d\u4ee4\u76f8\u540c\u3002<\/p>\n<p>Cut<br \/>\n\u5c06\u5f53\u524d\u9009\u5757\u4e2d\u7684\u6587\u4ef6\u526a\u5207\u5230\u526a\u5207\u677f\u4e2d\u3002<\/p>\n<p>Remove<br \/>\n\u5c06\u5f53\u524d\u9009\u5757\u4e2d\u7684\u6570\u636e\u4ece\u6587\u4ef6\u4e2d\u79fb\u9664\u3002<\/p>\n<p>CopyIntoNewFile \"D:\\New File.dat\" <br \/>\nCopyIntoNewFile \"D:\\File +MyVariable+.dat\" <br \/>\n\u5c06\u5f53\u524d\u9009\u5757\u4e2d\u7684\u6570\u636e\u590d\u5236\u8fdb\u6307\u5b9a\u7684\u65b0\u6587\u4ef6\uff0c\u800c\u4e0d\u590d\u5236\u8fdb\u526a\u5207\u677f\u3002\u5982\u679c\u6ca1\u6709\u5b9a\u4e49\u9009\u5757\uff0c\u5176\u529f\u80fd\u548c\u7f16\u8f91\u83dc\u5355\u4e2d\u7684\u590d\u5236\u547d\u4ee4\u76f8\u540c\u3002\u540c\u6837\u53ef\u4ee5\u590d\u5236\u78c1\u76d8\u6247\u533a\u4e2d\u7684\u6570\u636e\u4f5c\u4e3a\u4e00\u4e2a\u65b0\u6587\u4ef6\u3002\u65b0\u5efa\u7684\u6587\u4ef6\u4e0d\u4f1a\u81ea\u52a8\u5728WinHex\u7684\u7f16\u8f91\u7a97\u53e3\u4e2d\u6253\u5f00\u3002\u53ef\u4ee5\u5728\u201c+\u201d\u4e4b\u95f4\u52a0\u5165\u53d8\u91cf\uff0c\u53d8\u91cf\u540d\u5c06\u88ab\u89e3\u91ca\u4e3a\u4e0d\u5927\u4e8e2^24\uff0816M\uff09\u7684\u6574\u6570\u3002\u901a\u5e38\u5728\u5faa\u73af\u5e94\u7528\u4ee5\u53ca\u6587\u4ef6\u6062\u590d\u4e2d\u6bd4\u8f83\u6709\u7528\u3002<\/p>\n<p>Paste <br \/>\n\u5c06\u526a\u5207\u677f\u4e2d\u7684\u6570\u636e\u7c98\u8d34\u5165\u6587\u4ef6\u4e2d\uff0c\u5e76\u4e14\u4e0d\u6539\u53d8\u5149\u6807\u5f53\u524d\u4f4d\u7f6e\u3002<\/p>\n<p>WriteClipboard<br \/>\n\u5c06\u526a\u5207\u677f\u4e2d\u7684\u6570\u636e\u5199\u5165\u6587\u4ef6\u6216\u78c1\u76d8\u6247\u7684\u5f53\u524d\u4f4d\u7f6e\u4e2d\uff0c\u4e0d\u6539\u53d8\u5149\u6807\u5f53\u524d\u4f4d\u7f6e\uff0c\u5e76\u4e14\u8986\u76d6\u4ece\u5f53\u524d\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u4ee5\u540e\u7684\u6570\u636e\u3002<\/p>\n<p>Convert Param1 Param2 <br \/>\n\u5c06\u5f53\u524d\u6d3b\u52a8\u6587\u4ef6\u4e2d\u7684\u6570\u636e\u4ece\u4e00\u79cd\u683c\u5f0f\u8f6c\u6362\u6210\u53e6\u4e00\u79cd\u683c\u5f0f\u3002\u6709\u6548\u7684\u53c2\u6570\u662fANSI\uff0cIBM\uff0cEBCDIC\uff0cBinary\uff0cHexASCII\uff0cIntelHex\uff0cMotorolaS, Base64, UUCode, LowerCase, \u4ee5\u53caUpperCase\uff0c\u4e0e\u8f6c\u6362\u83dc\u5355\u4e2d\u7684\u8f6c\u6362\u83dc\u5355\u547d\u4ee4\u529f\u80fd\u76f8\u540c\u3002<\/p>\n<p>AESEncrypt \"My Password\" <br \/>\n\u4f7f\u7528AES\u52a0\u5bc6\u5f53\u524d\u6d3b\u52a8\u6587\u4ef6\u6216\u8005\u78c1\u76d8\uff0c\u6216\u5176\u9009\u5757\uff0c\u4f7f\u7528\u6307\u5b9a\u7684\u5bc6\u94a5\uff08\u6700\u9ad832\u4f4d\uff09\u3002<\/p>\n<p>AESDecrypt \"My Password\" <br \/>\n\u89e3\u5bc6\u5f53\u524d\u6d3b\u52a8\u6587\u4ef6\u6216\u78c1\u76d8\u3002<\/p>\n<p>Find \"John\" [MatchCase MatchWord Down Up BlockOnly SaveAllPos Unicode Wildcards] <br \/>\nFind 0x1234 [Down Up BlockOnly SaveAllPos Wildcards] <br \/>\n\u5206\u522b\u641c\u7d22\u5f53\u524d\u6d3b\u52a8\u7a97\u53e3\u4e2d\u540d\u4e3a\u201cjohn\u201d\u7684\u5b57\u7b26\u4e32\u621616\u8fdb\u5236\u503c\u65700x1234\uff0c\u5e76\u4e14\u5728\u7b2c\u4e00\u4e2a\u641c\u7d22\u5230\u7684\u5730\u65b9\u505c\u4e0b\u6765\u3002\u5176\u4ed6\u7684\u53c2\u6570\u662f\u53ef\u9009\u7684\u3002\u9ed8\u8ba4\u7684WinHex\u641c\u7d22\u6574\u4e2a\u6587\u4ef6\u6216\u78c1\u76d8\u3002\u5176\u4ed6\u7684\u53ef\u9009\u53c2\u6570\u529f\u80fd\u548c\u901a\u5e38\u7684WinHex\u641c\u7d22\u9009\u9879\u76f8\u540c\u3002<\/p>\n<p>ReplaceAll \"Jon\" \"Don\" [MatchCase MatchWord Down Up BlockOnly Unicode Wildcards] <br \/>\nReplaceAll 0x0A 0x0D0A [Down Up BlockOnly Wildcards] <br \/>\n\u5728\u5f53\u524d\u6d3b\u52a8\u7a97\u53e3\u4e2d\u4f7f\u7528\u5176\u4ed6\u7684\u503c\u66ff\u6362\u6240\u6709\u5b58\u5728\u4e0a\u8ff0\u5b57\u7b26\u4e32\u621616\u8fdb\u5236\u6570\u503c\u7684\u5730\u65b9\u3002\u5728\u201cin-place\u201d\u6a21\u5f0f\u4e0b\u53ea\u80fd\u5e94\u7528\u4e0e\u78c1\u76d8\u3002<\/p>\n<p>IfFound <br \/>\nA boolean value that depends on whether or not the last Find or ReplaceAll command was <br \/>\nsuccessful. Place commands that shall be executed if something was found after the IfFound <br \/>\ncommand. <\/p>\n<p>IfEqual MyVariable \"Hello World\" <br \/>\nIfEqual 0x12345678 MyVariable <br \/>\nIfEqual MyVariable 1000 <br \/>\nIfEqual MyVariable MyOtherVariable <br \/>\nIfEqual MyVariable (10*MyOtherVariable) <br \/>\n\u6bd4\u8f83\u4e24\u4e2a\u6574\u6570\u503c\uff08\u5176\u4e2d\u6bcf\u4e2a\u503c\u53ef\u4ee5\u662f\u5e38\u91cf\uff0c\u6574\u6570\u53d8\u91cf\u6216\u8005\u6570\u5b66\u8868\u8fbe\u5f0f\uff09\u6216\u8005\u4e24\u4e2a\u53d8\u91cf\uff0cASCII\u5b57\u7b26\u4e32\uff0c\u621616\u8fdb\u5236\u6570\u503c\uff082\u8fdb\u5236\u6a21\u5f0f\uff09\u3002\u6bd4\u8f83\u4e24\u4e2a\u5bf9\u8c61\u76842\u8fdb\u5236\u6570\u503c\u957f\u5ea6\uff0c\u5982\u679c\u4e0d\u76f8\u540c\u7684\u8bdd\u5219\u8fd4\u56de\u7ed3\u679c\u4e3afalse\u3002\u53ea\u6709\u8fd4\u56de\u503c\u4e3atrue\u65f6\uff0c\u4e0b\u9762\u7684\u547d\u4ee4\u624d\u4f1a\u88ab\u6267\u884c\u3002if\u6761\u4ef6\u4e0d\u53ef\u4ee5\u9576\u5957\u4f7f\u7528\u3002<\/p>\n<p>IfGreater MyVariable \"Hello World\" <br \/>\nIfGreater 0x12345678 MyVariable <br \/>\nIfGreater MyVariable 1000 <br \/>\nIfGreater MyVariable MyOtherVariable <br \/>\nIfGreater MyVariable (10*MyOtherVariable) <br \/>\n\u548cIfEqual\u62e5\u6709\u76f8\u540c\u7684\u53c2\u6570\u3002\u7b2c\u4e00\u4e2a\u53c2\u6570\u5927\u4e8e\u7b2c\u4e8c\u4e2a\u53c2\u6570\uff0c\u8fd4\u56de\u503c\u4e3atrue\uff0c\u5219\u4e0b\u9762\u7684\u547d\u4ee4\u624d\u80fd\u88ab\u6267\u884c\u3002if\u6761\u4ef6\u4e0d\u53ef\u4ee5\u9576\u5957\u4f7f\u7528\u3002<\/p>\n<p>Else<br \/>\n\u5e94\u7528\u5728IfFound\u6216IfEqual\u4e4b\u540e\u3002\u5982\u679c\u6ca1\u6709\u4efb\u4f55\u5bf9\u8c61\u88ab\u641c\u7d22\u5230\u6216\u8005\u6bd4\u8f83\u7684\u76ee\u6807\u4e0d\u76f8\u540c\uff0c\u5219\u6267\u884celse\u540e\u9762\u7684\u4ee3\u7801\u3002<\/p>\n<p>EndIf<br \/>\n\u7ed3\u675fif\u6761\u4ef6\u547d\u4ee4\u6267\u884c\uff08\u5728IfFound\u6216IfEqual\u4e4b\u540e\uff09\u3002<\/p>\n<p>{... <br \/>\nExitLoop <br \/>\n...} <br \/>\n\u9000\u51fa\u5faa\u73af\u3002\u5176\u540e\u4f1a\u6709\u4e00\u4e2a\u65b9\u62ec\u53f7\u6765\u5b9a\u4e49\u5176\u5faa\u73af\u6b21\u6570\uff0c\u53ef\u4ee5\u662f\u53d8\u91cf\u4e5f\u53ef\u4ee5\u662f\u5173\u952e\u5b57\u201cunlimited\u201d\uff08\u65e0\u9650\u5faa\u73af\uff09\u3002WinHex\u811a\u672c\u4e2d\u5faa\u73af\u53ea\u80fd\u4f7f\u7528ExitLoop\u547d\u4ee4\u6765\u9000\u51fa\u3002\u5faa\u73af\u4e0d\u53ef\u4ee5\u9576\u5957\u4f7f\u7528\u3002<br \/>\n\u4e3e\u4f8b\uff1a<br \/>\n{ Write \"Loop\" }[10] \u5c06\u8f93\u51fa\u201cLoop\u201d\u5b57\u7b26\u4e3210\u6b21\u3002<\/p>\n<p>Label ContinueHere <br \/>\n\u521b\u5efa\u4e00\u4e2a\u6807\u7b7e\u5e76\u547d\u540d\u4e3a\u201cContinueHere\u201d<\/p>\n<p>JumpTo ContinueHere <br \/>\nContinues script execution with the command following that label.<\/p>\n<p>NextObj <br \/>\n\u5faa\u73af\u5728\u6240\u6709\u7a97\u53e3\u4e2d\u8fdb\u884c\u5207\u6362\u201c\u6d3b\u52a8\u201d\u7a97\u53e3\u3002\u5982\u679c\u6709\u4e09\u4e2a\u7a97\u53e3\u88ab\u6253\u5f00\uff0c\u5e76\u4e14\u7a97\u53e3#3\u72b6\u6001\u4e3a\u6d3b\u52a8\u7a97\u53e3\uff0c\u5219\u201cNextObj\u201d\u547d\u4ee4\u5c06\u4f1a\u8ba9\u7a97\u53e3#1\u53d8\u4e3a\u6d3b\u52a8\u7a97\u53e3\u3002<\/p>\n<p>ForAllObjDo<br \/>\n\u5728ForAllObjDo\u4e0eEndDo\u4e4b\u95f4\u7684\u811a\u672c\u4ee3\u7801\u5c06\u5728\u6240\u6709\u6253\u5f00\u7684\u6587\u4ef6\u6216\u8005\u78c1\u76d8\u4e2d\u6267\u884c\u3002<\/p>\n<p>CopyFile C:\\A.dat D:\\B.dat <br \/>\n\u5c06C:\\A.dat\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u590d\u5236\u5230D:\\B.dat\u4e2d\u3002<\/p>\n<p>MoveFile C:\\A.dat D:\\B.dat <br \/>\n\u5c06C:\\A.dat\u6587\u4ef6\u8f6c\u79fb\u5230D\u76d8\u4e2d\u5e76\u547d\u540d\u4e3aD:\\B.dat\u3002<\/p>\n<p>DeleteFile C:\\A.dat <br \/>\n\u5c06C:\\A.dat\u6587\u4ef6\u5220\u9664\u3002<\/p>\n<p>InitFreeSpace <br \/>\nInitSlackSpace <br \/>\n\u4f7f\u7528\u5f53\u524d\u521d\u59cb\u5316\u8bbe\u7f6e\u6e05\u7406\u5f53\u524d\u903b\u8f91\u9a71\u52a8\u5668\u4e2d\u7684\u6240\u6709\u81ea\u7531\u7a7a\u95f4\u6216\u677e\u6563\u7a7a\u95f4\uff0cInitSlackSpace\u5c06\u9a71\u52a8\u5668\u7684\u6a21\u5f0f\u4e34\u65f6\u8f6c\u6362\u4e3a\u201cin-place\u201d\u6a21\u5f0f\uff0c\u4ee5\u4fdd\u5b58\u672a\u4fdd\u5b58\u7684\u4fee\u6539\u3002<\/p>\n<p>InitMFTRecords <br \/>\n\u4f7f\u7528\u5f53\u524d\u521d\u59cb\u5316\u8bbe\u7f6e\u5728\u5f53\u524dNTFS\u683c\u5f0f\u7684\u903b\u8f91\u9a71\u52a8\u5668\u4e2d\u6e05\u7406\u672a\u4f7f\u7528\u7684MFT FILE\u8bb0\u5f55\u3002\u5bf9\u4e8e\u5176\u4ed6\u7684\u6587\u4ef6\u7cfb\u7edf\u65e0\u6548\u3002\u4fee\u6539\u7acb\u5373\u5c31\u4f1a\u5199\u5165\u786c\u76d8\u4e2d\u3002<\/p>\n<p>Assign MyVariable 12345 <br \/>\nAssign MyVariable 0x0D0A <br \/>\nAssign MyVariable \"I like WinHex\" <br \/>\nAssign MyVariable MyOtherVariable<br \/>\n\u5c06\u6574\u6570\uff0c\u4e8c\u8fdb\u5236\u6570\u503c\uff0cASCII\u6587\u672c\uff0c\u6216\u5176\u4ed6\u53d8\u91cf\u5185\u5bb9\u4fdd\u5b58\u5230\u201cMyVariable\u201d\u53d8\u91cf\u4e2d\u3002\u5982\u679c\u8fd9\u4e2a\u53d8\u91cf\u4e0d\u5b58\u5728\uff0c\u5c06\u4f1a\u88ab\u81ea\u52a8\u521b\u5efa\u3002\u5176\u4ed6\u7684\u521b\u5efa\u53d8\u91cf\u7684\u65b9\u6cd5\uff1aRead\uff0cGetUserInput\uff0cInttoStr\u3002\u540c\u65f6\u53ef\u4ee5\u5141\u8bb8\u670948\u4e2a\u53d8\u91cf\u5b58\u5728\u3002<\/p>\n<p>Release MyVariable<br \/>\n\u5220\u9664\u4e00\u4e2a\u5df2\u5b58\u5728\u7684\u53d8\u91cf\uff0c\u56e0\u4e3aWinHex\u811a\u672c\u4e2d\u53ea\u652f\u630148\u4e2a\u53d8\u91cf\u5b58\u5728\uff0c\u6240\u4ee5\u7528\u8fc7\u7684\u4e0d\u518d\u4f7f\u7528\u53d8\u91cf\u6211\u4eec\u53ef\u4ee5\u5c06\u5176\u5220\u9664\u4ee5\u91ca\u653e\u53d8\u91cf\u7a7a\u95f4\u3002<\/p>\n<p>SetVarSize MyVariable 1 <br \/>\nSetVarSize MyVariable 4 <br \/>\n\u660e\u786e\u7684\u5b9a\u4e49\u4e86\u53d8\u91cf\u7684\u957f\u5ea6\u3002\u5728\u9650\u5236\u6570\u503c\u957f\u5ea6\u65b9\u9762\u6bd4\u8f83\u6709\u7528\uff0c\u6bd4\u5982\u6570\u503c\u548c\u8ba1\u7b97\u7ed3\u679c\u7684\u4e8c\u8fdb\u5236\u4ee5\u4e00\u4e2a\u56fa\u5b9a\u7684\u957f\u5ea6\u88ab\u5199\u5165\u6587\u4ef6\u4e2d\u3002\u5982\u679c\u6ca1\u6709servarsize\uff0c\u90a3\u4e48\u53d8\u91cf\u7684\u5927\u5c0f\u5c31\u65e0\u6cd5\u786e\u5b9a\u3002\u6bd4\u5982<br \/>\nExplicitly sets the allocated memory size of a variable at a given time, in bytes. This can be <br \/>\nuseful e.g. for variables that hold integer values and that are the result of a calculation, if this <br \/>\nvalue is to be written to a binary file with a fixed-length structure. Without SetVarSize, no <br \/>\nassumption must be made about the size of the variable. For instance, the number 300 could be <br \/>\nstored in any number of bytes larger than 1. If the new size set by SetVarSize is smaller than the <br \/>\nold size, the allocated memory is truncated. If the new size is larger, the allocated memory is <br \/>\nexpanded. At any rate, the value of the persisting bytes is retained. <\/p>\n<p>GetUserInput MyVariable \"Please enter your name:\"<br \/>\n\u5728\u811a\u672c\u8fd0\u884c\u671f\u95f4\uff0c\u4fdd\u5b58\u7528\u6237\u6307\u5b9a\u7684ASCII\u6587\u672c\u6216\u4e8c\u8fdb\u5236\u6570\u636e\uff080x...\uff09\u5230\u53d8\u91cf\u201cMyVariable\u201d\u4e2d\u3002\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7ed9\u9664\u4e86\u7528\u6237\u63d0\u793a\u3002\u5982\u679c\u53d8\u91cf\u4e0d\u5b58\u5728\uff0c\u5b83\u5c06\u91cd\u65b0\u521b\u5efa\u4e00\u4e2a\u3002\u5176\u4ed6\u521b\u5efa\u53d8\u91cf\u7684\u65b9\u5f0f\uff1aAssign\uff0cRead\u3002<\/p>\n<p>GetUserInputI MyIntegerVariable \"Please enter your age:\" <br \/>\n\u4e0eGetUserInput\u529f\u80fd\u76f8\u540c\uff0c\u4f46\u662f\u53ea\u5141\u8bb8\u6574\u6570\u578b\u53d8\u91cf\u3002<\/p>\n<p>Inc MyVariable <br \/>\n\u5c06\u53d8\u91cf\u89e3\u91ca\u4e3a\u6574\u6570\uff08\u4e0d\u5927\u4e8e8\u4f4d\uff09\u5e76\u4e14\u6bcf\u8fd0\u884c\u4e00\u6b21\u53d8\u91cf\u81ea\u52a8\u52a01\u3002\u5728\u5faa\u73af\u4e2d\u6709\u7528\u3002<\/p>\n<p>Dec MyVariable<br \/>\n\u5c06\u53d8\u91cf\u89e3\u91ca\u4e3a\u6574\u6570\uff08\u4e0d\u5927\u4e8e8\u4f4d\uff09\u5e76\u4e14\u6bcf\u8fd0\u884c\u4e00\u6b21\u53d8\u91cf\u81ea\u52a8\u51cf1\u3002\u5728\u5faa\u73af\u4e2d\u6709\u7528\u3002<\/p>\n<p>IntToStr MyStr MyInt <br \/>\nIntToStr MyStr 12345 <br \/>\n\u5c06\u7b2c\u4e00\u4e2a\u53d8\u91cf\u4e2d\u7684ASCII\u6587\u672c\u8f6c\u6362\u6210\u6574\u6570\u5e76\u4fdd\u5b58\u5230\u7b2c\u4e8c\u4e2a\u53d8\u91cf\u4e2d\u3002<\/p>\n<p>StrToInt MyInt MyStr<br \/>\n\u5c06\u7b2c\u4e00\u4e2a\u53d8\u91cf\u4e2d\u7684\u6574\u6570\u8f6c\u6362\u6210ASCII\u6587\u672c\u5e76\u4fdd\u5b58\u5230\u7b2c\u4e8c\u4e2a\u53d8\u91cf\u4e2d\u3002<\/p>\n<p>GetClusterAlloc MyStr<br \/>\n\u5728\u903b\u8f91\u5377\u4e2d\uff0c\u627e\u56de\u54ea\u4e2a\u6587\u4ef6\u88ab\u50a8\u5b58\u5728\u5f53\u524d\u7c07\u4e2d\u7684\u6587\u672c\u63cf\u8ff0\uff0c\u7136\u540e\u5c06\u63cf\u8ff0\u4fdd\u5b58\u5230\u6307\u5b9a\u7684\u53d8\u91cf\u4e2d\u3002<\/p>\n<p>GetClusterAllocEx IntVar <br \/>\n\u5728\u903b\u8f91\u5377\u4e2d\uff0c\u627e\u56de\u4e00\u4e2a\u6574\u6570\u503c\u6307\u793a\u7c07\u662f\u5426\u88ab\u5206\u914d\uff0c1\u6216\u8005\u975e0\uff0c\u8868\u793a\u8be5\u7c07\u5df2\u88ab\u5206\u914d\u3002\u5e76\u4e14\u5c06\u63cf\u8ff0\u4fdd\u5b58\u5728\u6307\u5b9a\u53d8\u91cf\u4e2d\u3002<\/p>\n<p>GetClusterSize IntVar <br \/>\n\u8fd4\u56de\u903b\u8f91\u5377\u4e2d\u7c07\u7684\u5927\u5c0f\uff0c\u5e76\u5c06\u6570\u503c\u4fdd\u5b58\u5230\u6307\u5b9a\u7684\u53d8\u91cf\u4e2d\u3002<\/p>\n<p>InterpretImageAsDisk <br \/>\n\u5c06\u78c1\u76d8\u955c\u50cf\u6216\u8bc1\u636e\u6587\u4ef6\u4f5c\u4e3a\u539f\u59cb\u7269\u7406\u78c1\u76d8\u6216\u5206\u533a\u4e00\u6837\u5bf9\u5f85\u3002\u9700\u8981specialist\u6216forensic\u8bb8\u53ef\u3002<\/p>\n<p>CalcHash HashType MyVariable <br \/>\nCalcHashEx HashType MyVariable <br \/>\n\u4e0e\u5de5\u5177\u83dc\u5355\u4e2d\u7684hash\u547d\u4ee4\u529f\u80fd\u76f8\u540c\u5e76\u4e14\u5c06\u53d8\u91cf\u50a8\u5b58\u5728\u6307\u5b9a\u53d8\u91cf\u4e2d\uff08\u5982\u679c\u53d8\u91cf\u4e0d\u5b58\u5728\uff0c\u5219\u4f1a\u81ea\u52a8\u521b\u5efa\uff09\u3002HashType\u53c2\u6570\u5fc5\u987b\u4e3a\u4ee5\u4e0b\u7c7b\u578b\u4e2d\u7684\u4e00\u79cd\uff1aCS8, CS16, CS32, CS64, CRC16, CRC32, MD5, SHA-1, SHA-256, PSCHF\u3002CalcHashEx\u547d\u4ee4\u5c06\u5728windows\u7a97\u53e3\u4e2d\u663e\u793ahash\u503c\u3002<\/p>\n<p>MessageBox \"Caution\"<br \/>\n\u663e\u793a\u4fe1\u606f\u5bf9\u8bdd\u6846\uff0c\u5e76\u4e14\u63d0\u4f9bok\u548ccancel\u4e24\u4e2a\u6309\u94ae\u3002\u6309\u4e0bcancel\u6309\u811a\u672c\u672c\u3002<\/p>\n<p>ExecuteScript \"ScriptName\" <br \/>\n\u5728\u811a\u672c\u7684\u5f53\u524d\u8fd0\u884c\u5904\u8fd0\u884c\u53e6\u4e00\u4e2a\u811a\u672c\u3002\u8c03\u7528\u5176\u4ed6\u5916\u90e8\u811a\u672c\u53ef\u4ee5\u9576\u5957\u4f7f\u7528\u3002\u5f53\u88ab\u8c03\u7528\u7684\u811a\u672c\u6267\u884c\u5b8c\u6210\u4ee5\u540e\uff0c\u811a\u672c\u7ee7\u7eed\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u3002\u8fd9\u4e2a\u7279\u5f81\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u6e05\u695a\u7684\u4e86\u89e3\u811a\u672c\u7684\u7ed3\u6784\u3002<\/p>\n<p>Turbo On <br \/>\nTurbo Off<br \/>\nIn turbo mode, most screen elements are not updated during script execution and you are not able <br \/>\nto abort (e.g. by pressing Esc) or pause. This may accelerate script execution if a lot of simple <br \/>\ncommands such as Move and NextObj are executed in a loop.<\/p>\n<p>Debug<br \/>\n\u7528\u6237\u53ef\u4ee5\u5229\u7528\u8be5\u547d\u4ee4\u786e\u5b9a\u811a\u672c\u4e2d\u7684\u6bcf\u4e00\u6761\u547d\u4ee4\u90fd\u662f\u5426\u6709\u6548\u3002<\/p>\n<p>UseLogFile<br \/>\n\u9519\u8bef\u4fe1\u606f\u88ab\u5199\u5165\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u7684\u65e5\u5fd7\u6587\u4ef6\u201cscripting.log\u201d\u3002\u8fd9\u4e9b\u4fe1\u606f\u4e0d\u4f1a\u663e\u793a\u5728\u4fe1\u606f\u5bf9\u8bdd\u6846\u4e2d\u3002\u975e\u5e38\u6709\u7528\uff0c\u7279\u522b\u5728\u8fd0\u884c\u7684\u811a\u672c\u4e3b\u673a\u65e0\u6cd5\u8fdc\u7a0b\u8fde\u63a5\u7684\u65f6\u5019\u3002<\/p>\n<p>CurrentPos <br \/>\nGetSize <br \/>\nunlimited <br \/>\n\u4ee5\u4e0a\u4e09\u4e2a\u662fWinHex\u811a\u672c\u4e2d\u7684\u5173\u952e\u5b57\uff0c\u53ef\u4ee5\u88ab\u4f7f\u7528\u5728\u5e94\u7528\u6570\u5b57\u53c2\u6570\u7684\u5730\u65b9\u3002\u5728\u811a\u672c\u6267\u884c\u8fc7\u7a0b\u4e2d\uff0cCurrentPos\u8868\u793a\u5f53\u524d\u6d3b\u52a8\u6587\u4ef6\u6216\u8005\u78c1\u76d8\u7a97\u53e3\u4e2d\u5149\u6807\u7684\u504f\u79fb\u5730\u5740\uff0cGetSize\u8868\u793a\u4e86\u5b83\u7684\u5927\u5c0f\u3002unlimited\u5b9e\u9645\u4e0a\u8868\u793a\u7684\u662f\u6574\u65702,147,483,647<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u811a\u672c\u547d\u4ee4\u9002\u7528\u7684\u73af\u5883\u6bd4\u8f83\u591a\u3002\u811a\u672c\u6587\u4ef6\u4e2d\u7684\u6ce8\u91ca\u4ee5\u4e3a\u53cc\u659c\u6760\u5f00\u5934\u3002\u811a\u672c\u652f\u6301\u7684\u6700\u957f255\u5b57\u7b26\u7684\u53c2\u6570\u3002\u6709\u7591\u70b9\u7684\u5730\u65b9\u662f\u5341\u516d\u8fdb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9,50],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-Technical_literature","tag-winhex"],"views":1439,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}