Sid Debian 132 Posted November 13, 2018 Does anybody found way to read data from players.db? Inventory BLOB contains a Binnary data and it's an object. Can developers describe how to read this data? Share this post Link to post Share on other sites
Fester808 11 Posted November 13, 2018 (edited) 2 hours ago, Sid Debian said: Does anybody found way to read data from players.db? Inventory BLOB contains a Binnary data and it's an object. Can developers describe how to read this data? Probably an SQLite file which can be opened with http://sqlitebrowser.org/ My host has SQLite in tools menu. This can be installed automatically to manage the database - I have not done this so can only suggest this - I can not give help beyond this.. “With this you can install a Database Editor on your server, this tool will allow you to edit and manage your server database, the misuse of this tool can potentially corrupt your server database, use with precaution.” Stop the server first and do a full backup of your server files before installing for precaution. You need to sync database files before and after editing using the database editor button. “You can find the details to access the database editor inside server details button.” - not sure where to find this on your panel. Perhaps speak to your host and ask them if they can help set it up. Good luck! Edited November 13, 2018 by Fester808 Share this post Link to post Share on other sites
lbmaster 21 Posted November 13, 2018 I have got around 95% of the Data read, but there are still some things I do not fully understand. Maybe I will share my final result somewhere around here. Share this post Link to post Share on other sites
Sid Debian 132 Posted November 13, 2018 1 hour ago, Fester808 said: Probably an SQLite file which can be opened with http://sqlitebrowser.org/ My host has SQLite in tools menu. This can be installed automatically to manage the database - I have not done this so can only suggest this - I can not give help beyond this.. “With this you can install a Database Editor on your server, this tool will allow you to edit and manage your server database, the misuse of this tool can potentially corrupt your server database, use with precaution.” Stop the server first and do a full backup of your server files before installing for precaution. You need to sync database files before and after editing using the database editor button. “You can find the details to access the database editor inside server details button.” - not sure where to find this on your panel. Perhaps speak to your host and ask them if they can help set it up. Good luck! No you no understand me. SQLite Browser is awesome tool, I know that file type is SQLite v3, but! Here describe of table with players: CREATE TABLE Players ( Id INTEGER PRIMARY KEY NOT NULL, Lock INTEGER NOT NULL, Alive INTEGER NOT NULL, UID CHAR(64) UNIQUE NOT NULL, Data BLOB NULL ); So: ID - unique number auto-increment. Lock - Boolean casted to integer (0 - false, 1 - true) Idea of this field - is show is player online of server, so if 1 -> then pler on server. Alive - Boolean casted to integer (0 - dead, 1 - alive). UID - is user unique ID, it seems to me based on Base64 + AES encription (i don't know witch type AES64, AES-128,AES-256,AES-1024.... ). Data - is BLOB that's mean it's byte format, but it can't be only byte array, it's an object of something class witch was serialized for storing in BLOB filed. So, question is how to read the data witch stored in this BLOB field? I think that some server owners already think about how to validate database, how to proper normalize database file (SQLite use page system, so if delete record from table there's an empty space in page and it can increase size of database). Any way moders will create futures witch must use database, so we need access to SQLite database, and if all data will stored inside database with cryptography - how mod devs can detect how was stored data inside table. Any way need to create chain between ID and player in database to validate access rights to something action in game. That's why I asked that question: How can I read data inside database (table Players) and any field inside this table? Share this post Link to post Share on other sites
Sid Debian 132 Posted November 13, 2018 1 hour ago, lbmaster said: I have got around 95% of the Data read, but there are still some things I do not fully understand. Maybe I will share my final result somewhere around here. I self try to understand information in table. Here part of my knowledges about it I'll be very glad if you can share your knowledges about data and fields. Quote Just now, Sid Debian said: No you no understand me. SQLite Browser is awesome tool, I know that file type is SQLite v3, but! Here describe of table with players: CREATE TABLE Players ( Id INTEGER PRIMARY KEY NOT NULL, Lock INTEGER NOT NULL, Alive INTEGER NOT NULL, UID CHAR(64) UNIQUE NOT NULL, Data BLOB NULL ); So: ID - unique number auto-increment. Lock - Boolean casted to integer (0 - false, 1 - true) Idea of this field - is show is player online of server, so if 1 -> then pler on server. Alive - Boolean casted to integer (0 - dead, 1 - alive). UID - is user unique ID, it seems to me based on Base64 + AES encription (i don't know witch type AES64, AES-128,AES-256,AES-1024.... ). Data - is BLOB that's mean it's byte format, but it can't be only byte array, it's an object of something class witch was serialized for storing in BLOB filed. So, question is how to read the data witch stored in this BLOB field? I think that some server owners already think about how to validate database, how to proper normalize database file (SQLite use page system, so if delete record from table there's an empty space in page and it can increase size of database). Any way moders will create futures witch must use database, so we need access to SQLite database, and if all data will stored inside database with cryptography - how mod devs can detect how was stored data inside table. Any way need to create chain between ID and player in database to validate access rights to something action in game. That's why I asked that question: How can I read data inside database (table Players) and any field inside this table? Share this post Link to post Share on other sites
lbmaster 21 Posted November 13, 2018 (edited) 8 hours ago, Sid Debian said: I self try to understand information in table. Here part of my knowledges about it I'll be very glad if you can share your knowledges about data and fields. I started with a small java program which gave me the Hex values in one row and the Ascii characters (if they were printable) in the row underneath. The data is not encrypted in some way like AES-128... There are some things that are actually human readable like the Player model used (e.g. SurvivorM_Peter) Things you should know about the formatting: - Any Number is saved in Little Edian Byte-Order not Big Edian ! - They often use Integers (4 Byte number) for length indicators of the next part (In Little Edian Byte Order) and sometimes single bytes for the String length. Often not very big, so you can easily detect them. (e.g. 0F000000 -> 15) - Floats are used for many other things like Position, Health, Blood ... - Basic Structure is: Character Position, Character Model, Health, Blood, Some things I haven't got yet, Energy, Water, Items in the Inventory. (They do not follow after each other) As long, as is did not understand it fully, I better give no exact example, but this should give you a rough idea on what is going on. LBmaster Edited November 13, 2018 by lbmaster Share this post Link to post Share on other sites
Sid Debian 132 Posted November 14, 2018 Spoiler 12 hours ago, lbmaster said: I started with a small java program which gave me the Hex values in one row and the Ascii characters (if they were printable) in the row underneath. The data is not encrypted in some way like AES-128... There are some things that are actually human readable like the Player model used (e.g. SurvivorM_Peter) Things you should know about the formatting: - Any Number is saved in Little Edian Byte-Order not Big Edian ! - They often use Integers (4 Byte number) for length indicators of the next part (In Little Edian Byte Order) and sometimes single bytes for the String length. Often not very big, so you can easily detect them. (e.g. 0F000000 -> 15) - Floats are used for many other things like Position, Health, Blood ... - Basic Structure is: Character Position, Character Model, Health, Blood, Some things I haven't got yet, Energy, Water, Items in the Inventory. (They do not follow after each other) As long, as is did not understand it fully, I better give no exact example, but this should give you a rough idea on what is going on. LBmaster An interesting analysis. I guess that thay use an MS VS C++, so need to try read those data over ByteReaders class. Perhaps it can help us in understanding. But nevertheless we can find that it usin' ASCI file code page, and data witch is most likely UTF-8 without BOM. I'd try export BLOB data to bianry file and set UTF-8 without BOM over Notepad++ and it gave me not bad values. Share this post Link to post Share on other sites