Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import os.path
- #======================================================================
- # -------------------------------------------------
- # Init
- # -------------------------------------------------
- if os.path.exists(sys.argv[1]) == False:
- print("File not found")
- exit()
- input_file = open(sys.argv[1],"rb")
- output_file = open(sys.argv[2],"wb")
- #======================================================================
- # -------------------------------------------------
- # Start
- # -------------------------------------------------
- Active = True
- READ_FROM = 0x10
- while Active:
- if READ_FROM > 0x1000:
- Active == False
- print(hex(READ_FROM))
- input_file.seek(READ_FROM)
- for i in range(0,0x800):
- a = int(ord(input_file.read(1)))
- output_file.write(bytes([a]))
- READ_FROM += 0x930
- # ----------------------------
- # End
- # ----------------------------
- input_file.close()
- output_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement