Skip to content

Instantly share code, notes, and snippets.

@nattybear
Created November 29, 2016 06:51
Show Gist options
  • Save nattybear/0bba6df54618725a0e84fd2fd60016aa to your computer and use it in GitHub Desktop.
Save nattybear/0bba6df54618725a0e84fd2fd60016aa to your computer and use it in GitHub Desktop.
0x57 위치에 무조건 0x40을 씁니다.
from os import getcwd, listdir
from sys import argv
cwd = getcwd()
list = listdir(cwd)
list.remove(argv[0])
for i in list:
fp = open(i, 'rb')
buf = fp.read()
fp.close()
buf = buf[:87] + b'\x40' + buf[88:]
fp = open(i + '_', 'wb')
fp.write(buf)
print '[*] %d files changed' % len(list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment