Quote:
Originally Posted by sheik_gray
ive asked a R4G3 Z0N3 and found that info, maybe you can understand that better, and can help us to work with that files:
To be honest those files are not encrypted at all at least server side...
they are simply ascii database that require a binary open and to be treated as binary streams...
Let's do an example for itemtable.bit
you need to open it as binary and define a stream
the first 48 bytes contains the tool that as created the itemtable between each byte there is a null so you have to read 48 bytes and remove all the \x00 (null char)
after those 48 bytes there are a set of numbers
Major Version you need to read an Int16
Minor Version you need to read another Int16
UPDATETIME Unsigned int 64
etc etc
is a binary stream that needs to be read line by line.
in python it should be something like that
f = open("item_table.bit", "rb")
#Set the binary stream
stream = BinaryStream(f)
#Reading header from itemtable
TOOLNAME=stream.readBytes(48).replace('\x00', '')
VERSION1=stream.readInt16()
VERSION2=stream.readInt16()
UPDATETIME=stream.readUInt64()
UPDATETIME2=stream.readUInt64()
UPDATETIME3=stream.readUInt64()
UPDATETIME4=stream.readUInt64()
USERNAME=stream.readBytes(20).replace('\x00', '')
after the main header the tables start... and this is the most complicate section, a lot of tables exist and each table have a different structure based on the kind of items it contains
|
I started a program that reads item_table.bit a long time ago. Whoever wrote the code above is a retard.
Code:
TOOLNAME=stream.readBytes(48).replace('\x00', '')
^ Idiot doesn't know it's in Unicode
Code:
UPDATETIME=stream.readUInt64()
UPDATETIME2=stream.readUInt64()
UPDATETIME3=stream.readUInt64()
UPDATETIME4=stream.readUInt64()
^ Idiot doesn't know it's a system time struct containing year, month, day of weak, day, hour, minute, second, and millisecond.
Code:
USERNAME=stream.readBytes(20).replace('\x00', '')
^ Again it's unicode. Idiot
Quote:
|
after the main header the tables start... and this is the most complicate section, a lot of tables exist and each table have a different structure based on the kind of items it contains
|
Should be "I'm too stupid to figure out the rest. So here's some retard code, it's the easiest part of the file and it's not even right so I'm just wasting everyone's time"
Truth is, this file is not complicated at all. It will just take some time to do, and I don't have any time to give it right now.