Looking for help with hashing (C#)

01/02/2013 23:44 Blue Ballz#1
Hello, everyone. I've been following this forum for some time. I never post because I can generally find what I'm looking for by searching the forum or by otherwise using web resources. I am however at a loss and thought I'd try my luck here on Epvp.

I'm writing a few tools in C# and I need a function to hash the names of rdb files. Since I have no clue where to start Thought I'd ask around.

I was using a tool that was given to me up until now but, as an example; When I try to hash db_string(ascii).rdb I get !PWS)3rDAd3O'`dU}deN instead of !PWS)3rDAd3O'`dU+O}deN

I would like to understand how this all works and be able to make edits in the future, not to mention the ability to use it in my own tools. Any help is much appreciated. Thanks in advanced. :)
01/03/2013 14:50 marekrndr#2
Quote:
Originally Posted by Blue Ballz View Post
Hello, everyone. I've been following this forum for some time. I never post because I can generally find what I'm looking for by searching the forum or by otherwise using web resources. I am however at a loss and thought I'd try my luck here on Epvp.
[Only registered and activated users can see links. Click Here To Register...]

Has it anything to do with HashAlgorithm.ComputeHash method? I've really never looked into the method Rappelz uses. I can help you out if you help me out. (or just wait for someone smarter to answer you)
01/03/2013 14:58 gr4ph0s#3
Maybe [Only registered and activated users can see links. Click Here To Register...] ? :)
01/03/2013 16:10 TheChinStrap#4
Lol, wrong thread...


Nulled
01/03/2013 17:18 Blue Ballz#5
Quote:
Originally Posted by gr4ph0s View Post
Maybe [Only registered and activated users can see links. Click Here To Register...] ? :)
Yes, I did see that but I must admit I am completely out of my depth. I haven't the foggiest how to read C. I know C# and I won't claim to be an expert even in that. I suppose I'll have to read some tutorials on C and get to work.

Quote:
Originally Posted by marekrndr View Post
I can help you out if you help me out.
What exactly did you have in mind?
01/03/2013 19:16 gr4ph0s#6
Quote:
Originally Posted by Blue Ballz View Post
Yes, I did see that but I must admit I am completely out of my depth. I haven't the foggiest how to read C. I know C# and I won't claim to be an expert even in that. I suppose I'll have to read some tutorials on C and get to work.

You just have to look into HashToName.c/h and NameToHash.c/h :)
01/04/2013 15:54 glandu2#7
Gr4ph0s mentionned the files you have to look at, hash conversion in C should not afraid someone that knows C# as the syntax is nearly the same.
There are just some loops, functions calls and arrays. Hashing is not a simple conversion to make reverse engineering more difficult to do, as data related to data.00x are mostly encrypted.
I use LEGACY_SEED as before doing the name->hash conversion, i did the algorithm using the reverse version of the hash->name one. But it leads to severals possibility and the correct one is returned when using LEGACY_SEED

Note that for the posted version, arrays name are not good names HashToName should have decryptTable* arrays instead of encryptTable* and the code is not optimized

char type is used as the byte type in C#, that is a one byte variable

For function like strcpy, strlen, floor, tolower, ... use [Only registered and activated users can see links. Click Here To Register...] or type them directly in google, you should get a link to that site explaining the behavior of these functions
01/04/2013 16:01 marekrndr#8
Quote:
Originally Posted by Blue Ballz View Post
What exactly did you have in mind?

Quote:
Originally Posted by Blue Ballz View Post
I was using a tool that was given to me up until now but, as an example; When I try to hash db_string(ascii).rdb I get !PWS)3rDAd3O'`dU}deN instead of !PWS)3rDAd3O'`dU+O}deN
Show me what you got and I'll fix it for you. Also I read the link that was posted above and I hassled it working.