import struct,os,sys from binascii import hexlify def GetIDandSEED(filename): tids = [] seeds = [] with open(filename,'rb') as savefile: savedata = savefile.read() while savedata.find('SEEDDB')>=0: SBoffset = savedata.find('SEEDDB') tidoffset = (struct.unpack('\\sysdata\\0001000f\\'" print 'Decyrpt NAND FAT16 partition and dump these files for this script.' sys.exit() for filename in sys.argv[1:]: titleid,seed = GetIDandSEED(filename) tids += titleid seeds += seed if len(tids)<1: print 'No SEED found.' sys.exit() outpath = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'seeddb.bin') with open(outpath,'wb') as seeddb: print '\nGenerating seeddb.bin ...' seeddb.write(struct.pack('