Hash Function

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
qooowinnerooop
Newcomer
Posts: 24
Joined: March 30th, 2017, 5:48 am
Title: Normal person

Hash Function

Post by qooowinnerooop »

is there any way to decode a hash function to know a hidden activator like this?

Code: Select all

if StringHash(SubString(GetEventPlayerChatString(),0,'d'))==-$50A9C479


in order to hide my activator i would like to know how to make a stringhash like this, can anyone show me the way to make it and decode it? Thanks a lots
You do not have the required permissions to view the files attached to this post.
User avatar
clanhinata
Old Wrinkly Member
Posts: 229
Joined: December 17th, 2011, 9:25 am
Title: Genius

Re: Hash Function

Post by clanhinata »

qooowinnerooop wrote:is there any way to decode a hash function to know a hidden activator like this?

Yes
qooowinnerooop wrote:in order to hide my activator i would like to know how to make a stringhash like this, can anyone show me the way to make it and decode it? Thanks a lots

Code: Select all

Native StringHash takes string whichString returns integer
User avatar
nuzamacuxe
Also Not an Admin, but closer than devoltz
Posts: 1655
Joined: February 14th, 2018, 5:35 am
Title: Just Another S.Mod

Re: Hash Function

Post by nuzamacuxe »

There's no way to decode StringHash.
User avatar
devoltz
Forum Staff
Posts: 2998
Joined: March 23rd, 2016, 8:06 pm

Re: Hash Function

Post by devoltz »

nuzamacuxe wrote:There's no way to decode StringHash.
I dont doubt hinata's autism, so he probably can decode stringhash.
User avatar
null
V.I.P.
Posts: 127
Joined: August 5th, 2017, 2:26 am
Title: Moon#6000
Location: Discord:

Re: Hash Function

Post by null »

Decoding StringHash is possible, but its almost near to impossible to find out the original cheat code from the hash value.

Think of a cheat code you want to use. For example, you want to use "cheat" as the cheat code. Create a test map where you print the hash value of cheat:

Code: Select all

call BJDebugMsg(StringHash("cheat"))


Then you know the hash value and you can use that information in the original map. Let's assume the hash value is 1234. Input;

Code: Select all

if StringHash(GetEventPlayerChatString())==1234 then

...
endif

In your code, you basically use this condition:

Code: Select all

StringHash(GetEventPlayerChatString()) ==  StringHash("cheat")


But replace the StringHash("cheat") with the calculated value, so you don't actually have to put the cheat code into the map script. As I said it is pretty much impossible to find out the original cheat code from the hash value. Not impossible, but still impossible in a way.
User avatar
devoltz
Forum Staff
Posts: 2998
Joined: March 23rd, 2016, 8:06 pm

Re: Hash Function

Post by devoltz »

Hinata autism + Null autism = we can decode stringhash.