Guest User

softdenchi_remove.py

a guest
Jul 27th, 2018
750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. # softdenchi_remove.py
  2. # Yes, really.
  3. # Usage: Drag game.exe onto softdenchi_remove.py
  4. # 4D 5A 90 = exe magic bytes, second occurrence since the first is the wrapper's own magic bytes.
  5.  
  6. import sys
  7. import os
  8.  
  9. in_filename = sys.argv[1]
  10. out_filename = a[:-4] + "-nodrm.exe"
  11.  
  12. with open(in_filename, "rb") as original_exe, open(out_filename, "wb") as patched_exe:
  13.     data = original_exe.read()
  14.     patched_exe.write(data[data.find(b'\x4D\x5A\x90', 1):])
Advertisement
Add Comment
Please, Sign In to add comment