読者です 読者をやめる 読者になる 読者になる

by shigemk2

当面は技術的なことしか書かない

コマンドの実行結果をdiffで比較する

Linux

http://tldp.org/LDP/abs/html/process-sub.html

$ diff -ur <(hexdump -C a.exe) <(hexdump -C 1e54400dcc3d41627015/a.exe)

ちなみにhexdump -Cとするとこんな感じで表示される. 16進数とASCII文字で出力

 diff -ur <(hexdump -C a.exe) <(hexdump -C 1e54400dcc3d41627015/a.exe)
--- /proc/self/fd/11    2014-09-16 13:13:36.875433702 +0900
+++ /proc/self/fd/12    2014-09-16 13:13:36.874433682 +0900
@@ -14,30 +14,25 @@
 000000d0  00 30 00 00 00 02 00 00  00 00 00 00 03 00 00 00  |.0..............|
 000000e0  00 00 10 00 00 10 00 00  00 00 10 00 00 10 00 00  |................|
 000000f0  00 00 00 00 10 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000100  00 20 00 00 9e 00 00 00  00 00 00 00 00 00 00 00  |. ..............|
+00000100  00 20 00 00 4d 00 00 00  00 00 00 00 00 00 00 00  |. ..M...........|
 00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 00000170  00 00 00 00 00 00 00 00  2e 74 65 78 74 00 00 00  |.........text...|
 00000180  0a 00 00 00 00 10 00 00  00 02 00 00 00 02 00 00  |................|
 00000190  00 00 00 00 00 00 00 00  00 00 00 00 20 00 00 60  |............ ..`|
-000001a0  2e 69 64 61 74 61 00 00  9e 00 00 00 00 20 00 00  |.idata....... ..|
+000001a0  2e 69 64 61 74 61 00 00  4d 00 00 00 00 20 00 00  |.idata..M.... ..|
 000001b0  00 02 00 00 00 04 00 00  00 00 00 00 00 00 00 00  |................|
 000001c0  00 00 00 00 40 00 30 c0  00 00 00 00 00 00 00 00  |....@.0.........|
 000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
-00000200  6a 41 ff 15 50 20 40 00  58 c3 00 00 00 00 00 00  |jA..P @.X.......|
+00000200  6a 41 ff 15 30 20 40 00  58 c3 00 00 00 00 00 00  |jA..0 @.X.......|
 00000210  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
-00000400  3c 20 00 00 00 00 00 00  00 00 00 00 86 20 00 00  |< ........... ..|
-00000410  50 20 00 00 48 20 00 00  00 00 00 00 00 00 00 00  |P ..H ..........|
-00000420  91 20 00 00 5c 20 00 00  00 00 00 00 00 00 00 00  |. ..\ ..........|
-00000430  00 00 00 00 00 00 00 00  00 00 00 00 64 20 00 00  |............d ..|
-00000440  6e 20 00 00 00 00 00 00  78 20 00 00 00 00 00 00  |n ......x ......|
-00000450  64 20 00 00 6e 20 00 00  00 00 00 00 78 20 00 00  |d ..n ......x ..|
-00000460  00 00 00 00 00 00 70 75  74 63 68 61 72 00 00 00  |......putchar...|
-00000470  67 65 74 63 68 61 72 00  00 00 45 78 69 74 50 72  |getchar...ExitPr|
-00000480  6f 63 65 73 73 00 6d 73  76 63 72 74 2e 64 6c 6c  |ocess.msvcrt.dll|
-00000490  00 6b 65 72 6e 65 6c 33  32 2e 64 6c 6c 00 00 00  |.kernel32.dll...|
-000004a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
+00000400  28 20 00 00 00 00 00 00  00 00 00 00 42 20 00 00  |( ..........B ..|
+00000410  30 20 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |0 ..............|
+00000420  00 00 00 00 00 00 00 00  38 20 00 00 00 00 00 00  |........8 ......|
+00000430  38 20 00 00 00 00 00 00  00 00 70 75 74 63 68 61  |8 ........putcha|
+00000440  72 00 6d 73 76 63 72 74  2e 64 6c 6c 00 00 00 00  |r.msvcrt.dll....|
+00000450  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|