这样,就可以生成规则排列的十六进制字节码并存储在文件2.txt中,如代码清单1-2所示。是不是和FlexHEX显示的结果差不多呢?
代码清单1-2 HelloWorld.exe文件的字节码(chapter1\2.txt)
13B7:0100 4D 5A 90 00 03 00 00 00-04 00 00 00 FF FF 00 00 MZ…………..
13B7:0110 B8 00 00 00 00 00 00 00-40 00 00 00 00 00 00 00 ……..@…….
13B7:0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 …………….
13B7:0130 00 00 00 00 00 00 00 00-00 00 00 00 B0 00 00 00 …………….
13B7:0140 0E 1F BA 0E 00 B4 09 CD-21 B8 01 4C CD 21 54 68 ……..!..L.!Th
13B7:0150 69 73 20 70 72 6F 67 72-61 6D 20 63 61 6E 6E 6F is program canno
13B7:0160 74 20 62 65 20 72 75 6E-20 69 6E 20 44 4F 53 20 t be run in DOS
13B7:0170 6D 6F 64 65 2E 0D 0D 0A-24 00 00 00 00 00 00 00 mode….$…….
13B7:0180 5D 5C 6D C1 19 3D 03 92-19 3D 03 92 19 3D 03 92 ]\m..=…=…=..
13B7:0190 97 22 10 92 1E 3D 03 92-E5 1D 11 92 18 3D 03 92 ….=…….=..
13B7:01A0 52 69 63 68 19 3D 03 92-00 00 00 00 00 00 00 00 Rich.=……….
取消
评论