SA-MP Forums

Go Back   SA-MP Forums > SA-MP > General

Reply
 
Thread Tools Display Modes
Old 20/11/2019, 12:46 PM   #1
s4lsalsoft
Little Clucker
 
Join Date: Sep 2018
Posts: 6
Reputation: 0
Question How to read USERDATA.DAT, File where servers are stored?

Hi, As the title says. What is the original format of that file?
How to read it? to display it for example with the Notepad.


Thank you, I await your answers!
s4lsalsoft is offline   Reply With Quote
Old 21/11/2019, 06:01 AM   #2
RoboN1X
Huge Clucker
 
RoboN1X's Avatar
 
Join Date: Feb 2011
Location: Indonesia
Posts: 395
Reputation: 92
Default Re: How to read USERDATA.DAT, File where servers are stored?

We don't know for sure, it is basic DAT which stores application data...

If we open it with notepad, we can see some plain strings, there are separators which are null and some binaries for the file structure thought.

The file can be read in Big Endian, default system encoding
It has file header "SAMP" on first 4 bytes which mark it can be managed by the SA-MP client
The next 3 bytes seems to be file format version
Then the rest is favorite server list (all in variable size):
  • Server IP Address (in plain text, i.e. 123.123.123.123 or www.example.com)
  • Server Port number
  • Server Name string
  • Server password (in plain text) if any
I think it is updated when you add/remove a server from the list

Even if you exported the server list into .fav file, it is still the same format as the .dat, except you can choose to include saved server passwords or not while exporting
Then you can import the same .fav or .dat (renamed to .fav) as favorite server list

Correct Me If I'm Wrong.
__________________
Need Help? Use Search, WIKI, and FAQ
RoboN1X is offline   Reply With Quote
Old 21/11/2019, 06:05 AM   #3
d3Pedro
Huge Clucker
 
Join Date: Apr 2012
Location: darkness
Posts: 294
Reputation: 91
Default Re: How to read USERDATA.DAT, File where servers are stored?

You can read it using notepad.
It basically store all the servers you have in your favourite sa-mp client list.
d3Pedro is offline   Reply With Quote
Old 22/11/2019, 01:29 PM   #4
s4lsalsoft
Little Clucker
 
Join Date: Sep 2018
Posts: 6
Reputation: 0
Default Re: How to read USERDATA.DAT, File where servers are stored?

Hello, thanks for the answers, I have already found a way to read the .dat file by reading it as a binary and extralating the array.

Thanks to the following guide I was able to launch SAMP through Inject "samp.dll".


I currently develop my own Launcher. (I have problems with sending the query) .

s4lsalsoft is offline   Reply With Quote
Old 22/11/2019, 01:31 PM   #5
d3Pedro
Huge Clucker
 
Join Date: Apr 2012
Location: darkness
Posts: 294
Reputation: 91
Default Re: How to read USERDATA.DAT, File where servers are stored?

sup with that 'Attack' in your own launcher?
d3Pedro is offline   Reply With Quote
Old 22/11/2019, 01:35 PM   #6
s4lsalsoft
Little Clucker
 
Join Date: Sep 2018
Posts: 6
Reputation: 0
Default Re: How to read USERDATA.DAT, File where servers are stored?

umm. Well, it may include attacks Ddos, UDP, query flood. etc..
Domain hosted, merge ip and get the domain where the server is hosted.
s4lsalsoft is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error 100: cannot read from file: "Double-O-File" IamPuzo Scripting Help 1 05/07/2016 06:41 AM
Help needed in Deleting userdata. kasper1996 Scripting Help 6 30/12/2014 02:09 PM
How can i read a file and get a line from that file. CSMajor Help Archive 7 12/08/2010 06:03 PM
Big (Client) Problem [Read if you know anything about SA-MP servers] Moso Help Archive 2 06/05/2009 10:31 PM


All times are GMT. The time now is 08:31 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.