shorewake Posted March 15 Posted March 15 (edited) Hi! after looking around on old Xentax posts I have found nothing would dump the .BIN files. I have never seen a LF header before I'm pretty sure its an archive header, also tried every importer I could find, Any help? Thanks! Michigan Report from Hell BIN.7z Edited March 15 by shorewake
r88 Posted March 31 Posted March 31 (edited) Extracter in python: Spoiler #Michigan: Report from Hell *.BIN #extracter by setttsuya aka rzhumen88 import os import struct def extract(path): CHUNK = 0x800 DIR = path[:3] with open(path, 'rb') as f: f = f.read() reader = 4 fileid = 0 if f[:2] != b'LF': print('Wrong header!') return 0 if not os.path.isdir(DIR): os.mkdir(DIR) while reader < CHUNK: offset, length = struct.unpack('II', f[reader:reader+8]) offset = offset * CHUNK reader += 8 if offset > 0 and length > 0: with open(DIR+'/'+str(fileid), 'wb') as extracted: extracted.write(f[offset:offset+length]) print(f'Extracted: {fileid}') fileid += 1 if __name__ == '__main__': usr_input = '' while True: print('Enter path to .BIN file') usr_input = input() if os.path.isfile(usr_input): extract(usr_input) input('Done!') break However there's no filenames inside. Edited March 31 by r88
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now