add 7.1.7

This commit is contained in:
firmianay
2018-02-15 12:25:53 +08:00
parent c9a2f60561
commit fc5f1837ce
6 changed files with 140 additions and 7 deletions

View File

@ -0,0 +1,17 @@
import os
hello = "#include<stdio.h>\nint main(){printf(\"HelloWorld!\\n\"); return 0;}"
f = open("helloWorld.c", 'w')
f.write(hello)
f.close()
os.system("gcc -c helloWorld.c -o test")
f = open("test", 'rb+')
f.read(0x2c)
f.write("\xff\xff") # 65535
f.read(0x244-0x2c-2)
f.write("\x00\x00\x00\x20") # 536870912
f.close()
os.system("objdump -x test")