xbe titleID
#1
trying to read out titleid in python, how to do this (if even possible. have looked at xbe in a texteditor, cant find the id anywhere?
Reply
#2
thx to spiff, managed to make a hack :d

dirty *python gurus, close your eyes*

fh = open("q:\\scripts\\default.xbe",'rb') #open xbe
fh.seek(0x104) # seek to first dword
s1 = fh.read(4) #read dword
s1 = struct.unpack('l',s1) #unpack byte into integer
fh.close() #close file
fh = open("q:\\scripts\\default.xbe",'rb') # open xbe
fh.seek(0x118) # seek to second dword
s2 = fh.read(4) # read dword
s2 = struct.unpack('l',s2) # unpack byte to integer
fh.close() # close file
s3 = int(s2[0]) - int(s1[0]) + 8 # calculate final dword
fh = open("q:\\scripts\\default.xbe",'rb') # open xbe
fh.seek(s3) # seek to final dword
thes = fh.read(4) # read dword
thes = struct.unpack('l',thes) # unpack byte to integer
fh.close() # close file
thes = hex(thes[0]) # make a hex number of it, needs to be parsed, but its 4am here so i'll give it a rest :d
Reply

Logout Mark Read Team Forum Stats Members Help
xbe titleID0