Advertisement
GenesisFan64

Untitled

Nov 30th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. import sys
  2. import os.path
  3.  
  4. #======================================================================
  5. # -------------------------------------------------
  6. # Init
  7. # -------------------------------------------------
  8.  
  9. if os.path.exists(sys.argv[1]) == False:
  10.     print("File not found")
  11.     exit()
  12.    
  13. input_file = open(sys.argv[1],"rb")
  14. output_file = open(sys.argv[2],"wb")
  15.  
  16. #======================================================================
  17. # -------------------------------------------------
  18. # Start
  19. # -------------------------------------------------
  20.  
  21. Active = True
  22. READ_FROM = 0x10
  23. while Active:
  24.     if READ_FROM > 0x1000:
  25.         Active == False
  26.     print(hex(READ_FROM))
  27.  
  28.     input_file.seek(READ_FROM)
  29.     for i in range(0,0x800):
  30.         a = int(ord(input_file.read(1)))
  31.         output_file.write(bytes([a]))
  32.  
  33.     READ_FROM += 0x930
  34.    
  35. # ----------------------------
  36. # End
  37. # ----------------------------
  38.  
  39. input_file.close()
  40. output_file.close()    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement