Skip to content

Instantly share code, notes, and snippets.

@TurBoss
Last active August 29, 2015 14:24
Show Gist options
  • Save TurBoss/82f6aa4143eaae60963d to your computer and use it in GitHub Desktop.
Save TurBoss/82f6aa4143eaae60963d to your computer and use it in GitHub Desktop.
Patch FF7.exe
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
offset = 5371020
crecimientos = ["\x2E\x49\x4E\x47\x55\x4E\x4F\xFF\x00\x00", # Ninguno
"\x2E\x4F\x52\x4D\x41\x4C\xFF\x00\x00\x00", # Normal
"\x24\x4F\x42\x4C\x45\xFF\x00\x00\x00\x00", # Doble
"\x34\x52\x49\x50\x4C\x45\xFF\x00\x00\x00", # Triple
"\x23\x55\x67\x44\x52\x55\x50\x4C\x45\xFF", # Cuádruple
"\x31\x55\x72\x4E\x54\x55\x50\x4C\x45\xFF", # Quíntuple
"\x00\x00\x00\x00"]
def main(fileName):
with open(fileName, 'r+b') as ff7:
print("Opening %s" % fileName)
ff7.seek(offset)
for crecimiento in crecimientos:
ff7.write(crecimiento)
print("Writing... %s" % crecimiento)
print("Closing %s" % fileName)
ff7.close()
if __name__ == "__main__": main(sys.argv[1:][0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment