Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server
You last visited: Today at 05:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[REQUEST]Source code for a data.sah/saf reader

Discussion on [REQUEST]Source code for a data.sah/saf reader within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2014
Posts: 29
Received Thanks: 16
[REQUEST]Source code for a data.sah/saf reader

Hey fellow Devs,

I was wondering if anyone had or could program a data.saf/sah reader in python, Java or C++, because I would very much need one for my programs I'm programming. I'm not sure if this is the right place to ask but I'm pretty sure some people in this community would know how to program one.

If nobody has one or could program one I'll take my own chances and try to program on myself but I guess I'd be better off if I didn't have to create one myself as I merely know where to start(well I know how the data.sah and data.saf work but thats just about it).

Thanks a lot if anyone could help,

[DaE]Asew
[DaE]Asew is offline  
Old 07/31/2014, 19:14   #2
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Quote:
Originally Posted by [DaE]Asew View Post
well I know how the data.sah and data.saf work but thats just about it
What's the actual problem then ?
nubness is offline  
Old 07/31/2014, 20:32   #3
 
elite*gold: 0
Join Date: Mar 2014
Posts: 29
Received Thanks: 16
Quote:
Originally Posted by nubness View Post
What's the actual problem then ?
I don't know where to start. oO
[DaE]Asew is offline  
Old 07/31/2014, 20:54   #4
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Do you know any programming language ?
nubness is offline  
Old 07/31/2014, 21:01   #5
 
elite*gold: 0
Join Date: Mar 2014
Posts: 29
Received Thanks: 16
Quote:
Originally Posted by nubness View Post
Do you know any programming language ?
Well all 3 stated in my post (Python, Java and C++) but mostly oriented in creating 2D games but I'm a little less comfortable in C++ then the other 2. Why would I have asked for the source codes in tose languages if I didn't know those languages?

And this is pretty much all I know about a data.sah and data.saf: a data.sah file is a kind of meta-indexes, it contains the list of all files present in the .saf archive; for each file we found its name, its length and the offset within data.sah where this file starts, the data.saf is the concatenation of all files, all stored one after the others without any delimiter.
[DaE]Asew is offline  
Old 07/31/2014, 22:48   #6
 
elite*gold: 0
Join Date: Mar 2014
Posts: 5
Received Thanks: 1
Well I would suggest you just make up your own files like data.xsaf and data.xsah and you can have encryption and stuff like that but it mostly keeps the same structure as the normal .sah/.saf
Well its just a suggestion I'm not sure if its a good one but yeah, if you can't code a reader, do that.
[GM]TroubleMaker is offline  
Thanks
1 User
Old 07/31/2014, 23:34   #7
 
elite*gold: 0
Join Date: Aug 2013
Posts: 244
Received Thanks: 56
Quote:
Originally Posted by [DaE]Asew View Post
Hey fellow Devs,

I was wondering if anyone had or could program a data.saf/sah reader in python, Java or C++, because I would very much need one for my programs I'm programming. I'm not sure if this is the right place to ask but I'm pretty sure some people in this community would know how to program one.

If nobody has one or could program one I'll take my own chances and try to program on myself but I guess I'd be better off if I didn't have to create one myself as I merely know where to start(well I know how the data.sah and data.saf work but thats just about it).

Thanks a lot if anyone could help,

[DaE]Asew
If Your a real developer, you should not need help. You should be able to figure it out your self, i mean comon this is just simple programming. How about you try to program it before you ask for help. Also, No one should have to help you with this, many have managed to do this by themselves, its not exactly that hard. You can also google and research how to do somethings, like how to get started on making readers.
[Admin]Slice is offline  
Old 08/01/2014, 00:14   #8
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Quote:
Originally Posted by [Admin]Slice View Post
If Your a real developer, you should not need help. You should be able to figure it out your self, i mean comon this is just simple programming. How about you try to program it before you ask for help. Also, No one should have to help you with this, many have managed to do this by themselves, its not exactly that hard. You can also google and research how to do somethings, like how to get started on making readers.
It's simple programming ? Simple programming ?!? Relatively speaking, it is super simple programming, but for some people it isn't.

You can use any language you're familiar with. All you need are basic I/O operations.

Try to study the .sah file format, it's quite easy to understand. I would tell you the format myself, but I think you'll feel much better after you crack it on your own. Good luck.
nubness is offline  
Old 08/01/2014, 02:21   #9
 
elite*gold: 0
Join Date: Aug 2013
Posts: 244
Received Thanks: 56
Quote:
Originally Posted by nubness View Post
It's simple programming ? Simple programming ?!? Relatively speaking, it is super simple programming, but for some people it isn't.

You can use any language you're familiar with. All you need are basic I/O operations.

Try to study the .sah file format, it's quite easy to understand. I would tell you the format myself, but I think you'll feel much better after you crack it on your own. Good luck.
i was just saying, i made some readers in the past, and it was pretty simple for me.
[Admin]Slice is offline  
Old 08/01/2014, 08:47   #10
 
elite*gold: 0
Join Date: Mar 2014
Posts: 29
Received Thanks: 16
Quote:
Originally Posted by nubness View Post
It's simple programming ? Simple programming ?!? Relatively speaking, it is super simple programming, but for some people it isn't.

You can use any language you're familiar with. All you need are basic I/O operations.

Try to study the .sah file format, it's quite easy to understand. I would tell you the format myself, but I think you'll feel much better after you crack it on your own. Good luck.
Ok then I'll try it out myself.
Its actually easier than I thought...

EDIT: Im actually gonna go with what GM TroubleMaker said because it would actually be pretty easy to get hold of all the data if using data.sah/saf cos there are already so many tools out there to break into the files. So now im making two file data.gdh -> data.sah and data.gdf -> data.saf and well the only differents really is kind of the way the data.sah is structured and that the whole file is encrypted.
[DaE]Asew is offline  
Old 08/04/2014, 04:43   #11
 
castor4878's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 717
Received Thanks: 3,367
Hi Folks,

No, I wasn't dead

I recently noticed that shaiya discover the "i18n" paradigm, never tool late.
It also means that shStudio will soon or later only manage a very few part of the files.
I so decide to re-re-spend some time on it.

And since I have the code that close ...

1) the data.saf in a big stream resulting of the concatenation (a cat) of all files used by the client, it has no own structure since it is not packed (zipped) in any manner.

2) the data.sah contains the indexes required to parse the archive (meaning the .saf).

the header of the file is as follows:

Code:
struct sah_header {
//	51 bytes flat structure
	char	signature[3];	//	'SAH'
	long	unk1;			//	0
	long	nbFiles;		//	number of all files (not including folders)
	char	padding[40];	//	00s
};
then, one reads recursively:

- name of current directory
- number of files in that directory (long, 32 bits)
+ for each file
- name of file (relative to the parent directory)
- offset in .saf where the file starts (__int64, 64 bits)
- file's length (long, 32 bits)
- "attributs" (long, 32 bits) can be anything, not used by clients (can store "version" info).
+ end for
- number of child directories (long, 32 bits)
{ each sub-dir is read recursively with same structure }

all string (names of files and directories) are prefixed by their length coded as a long (32 bits, Little Endian), the ZeroTerminal char. is usually included in this length; so for instance the root directory (which is usually - but not mandatory - empty) is coded as: [01 00 00 00](length) [00] "\0"

once you have found the right file name in right directory, you use the corresponding offset within the .saf to read the given size of data.
after edition, if any, you can store the file at the same offset as long as it is not bigger than its original size, you will store the new (shorter) length if required; if file is larger, a new block is added at the end of .saf and the record in .sah is updated with the new offset & length.

Quote:
So now im making two file data.gdh -> data.sah and data.gdf -> data.saf and well the only differents really is kind of the way the data.sah is structured and that the whole file is encrypted.
I definitively failed to get the point !...
If the purpose was to read the files used by a valid client and to generate files still valid for a client, use the structure above; if the point is to produce random data, you can indeed encipher the files with an unknown key or easier XOR the whole file with the current CPU temperature.

Cheers.
castor4878 is offline  
Thanks
12 Users
Old 01/16/2015, 23:29   #12
 
elite*gold: 0
Join Date: Jan 2015
Posts: 1
Received Thanks: 0
Have 1010 Dell mini, All works except some game panels will not open when depressing tab, or talk... Like, Skill tab, it sling the slider down, and the entire window will not drag anywhere, and can not open skill.. basic, combat, or special. The warehouse, and NGC quest givers won't open either.

Have re-installed, have updated last drivers known, and cleaned with CCleaner as told.

Now suspecting the game streaming is not returning from client to function.

Got any ideas?

709
SevenZeroNine is offline  
Reply


Similar Threads Similar Threads
Request Source code
06/28/2014 - Flyff Private Server - 0 Replies
help me how to add like this 3D login Screen: http://i1.ytimg.com/vi/RRdpPwoCLG8/maxresdefault.j pg give me some codes please :handsdown: thanks in advance ;)
Bin READER / WRITER [SOURCE]
04/06/2013 - WarRock - 7 Replies
Heyho, Ich Release mal meine Decoder und Encoder Source für .bin Dateien. Have fun :) Multiupload.nl - upload your files to multiple file hosting sites! Virustotal:
Reader with code source
04/29/2012 - CO2 Programming - 7 Replies
it's reader with code source , nothing fancy , some methods of copy,past,cut,select,delete,read,readAndClean also catching ctrl+a to select all , ctrl+r to read it read throw instance of SpVoice at SpeechLib. , it's voice is so damn weird and talking pretty fast but it helps me when im multi tasking or too lazy to read :P feel free to correct any mistakes in the code (if there :P) it may not be the best way to get it done but im still learning :) code source P.S add the SpeechLib as...
C++ Source code (request)
03/12/2012 - 12Sky2 Hacks, Bots, Cheats & Exploits - 2 Replies
Hi guys, I started a new C + + and I wonder if the hands can share the basic source code really need one badly,Thank you. Sorry for my bad english.
[Request]C++ Bot Source Code/Example Code
07/19/2008 - Silkroad Online - 2 Replies
Please someone direct me to anywhere that might have any sort of information and resources on the construction of a bot, preferably in C++. Looking for any Reverse engineering information(finding the Base addr for say player) and locating the offsets ptrs for Cur health etc. I would also love to see a simple example source in C++ of putting those addresses and offsets into action. I'm sure I have the basic idea down on how to do this but I'm not 100% sure how to get it setup correctly. ...



All times are GMT +1. The time now is 05:06.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.