Post: String Encryption/Decryption, much better than before
07-26-2012, 06:57 PM #1
Choco
Respect my authoritah!!
(adsbygoogle = window.adsbygoogle || []).push({}); Seeing all these other string encryption/decryption attempts lately, I noticed that they all are easily crackable and are really nothing more than replacement of characters. I decided to to try and make one that is a bit more difficult to crack, and this was the result I got Winky Winky

Here is an example of what the string "nextgenupdate" looks like beside it's encrypted form (picture is from HxD, because special characters were used and they won't show on this site):

You must login or register to view this content.

Here are the functions you need:

    Encrypt( string )
{
encryptedString = "";
split = int( string.size / 2 );
part1 = GetSubStr( string, 0, split );
part2 = GetSubStr( string, split, string.size );
strCrypt = reverseStr( part1 );
for( i = 0; i < strCrypt.size; i++ )
{
num = GetCharacterID( strCrypt[i] );
encryptedString += level.encChar[num];
}
strCrypt = reverseStr( part2 );
for( j = 0; j < strCrypt.size; j++ )
{
num = GetCharacterID( strCrypt[j] );
encryptedString += level.encChar[num];
}
return encryptedString;
}

Decrypt( string )
{
decryptedString = "";
split = int( string.size / 2 );
part1 = GetSubStr( string, 0, split );
part2 = GetSubStr( string, split, string.size );
strCrypt = reverseStr( part1 );
for( i = 0; i < strCrypt.size; i++ )
{
num = GetEncCharacterID( strCrypt[i] );
decryptedString += level.fullChar[num];
}
strCrypt = reverseStr( part2 );
for( j = 0; j < strCrypt.size; j++ )
{
num = GetEncCharacterID( strCrypt[j] );
decryptedString += level.fullChar[num];
}
return decryptedString;
}

GetEncCharacterID( char )
{
for( i = 0; i < level.encChar.size; i++ )
{
if( char == level.encChar[i] )
return i;
}
return 0;
}

GetCharacterID( char )
{
for( i = 0; i < level.fullChar.size; i++ )
{
if( char == level.fullChar[i] )
return i;
}
return 0;
}

reverseStr( string )
{
out = "";
for( n = string.size - 1; n >= 0; n-- )
out += string[n];

return out;
}


You will also need this under init():

    fullCharList = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789`~!@#$%^&*()-_+=\|}]{[':;/?.>,< ";
encCharList = "** ********** ![#$%&'()01á3ü56é89@A¿]DÜ{ñTIÍrº}zvVÑXY`abídófÚhÉpqrÓúuvÁx¡€‚ƒ„…†‡ˆ‰‘’“”";

level.fullChar = [];
for( j = 0; j < fullCharList.size; j++ )
level.fullChar[j] = fullCharList[j];

level.encChar = [];
for( i = 0; i < encCharList.size; i++ )
level.encChar[i] = encCharList[i];


Here is a You must login or register to view this content. for the GSC file containing all of these scripts, you need it because the characters used in encryption won't show up on NGU.

Enjoy Smile
(adsbygoogle = window.adsbygoogle || []).push({});

The following 7 users say thank you to Choco for this useful post:

Harry, INSAN3LY_D34TH, Kush Friendly, LightModz, Script Kiddie, Taylor, Uk_ViiPeR
07-27-2012, 05:38 PM #11
Blackstorm
Veni. Vidi. Vici.
Originally posted by x. View Post
Maybe, but it still only took me 2 mins to break it



:bat: :bat: :bat:
07-27-2012, 09:58 PM #12
Originally posted by x. View Post
You can always just print out the solution Winky Winky

It's more an exercise in programming rather than gsc modding though so I'm sure some people find it interesting. Personally, I only like things that have explosions....


You can use it for heavy obfuscation for gsc.

as you would C#, or vb.net
07-28-2012, 12:04 AM #13
Originally posted by GAMER View Post
You can use it for heavy obfuscation for gsc.


You could do but whats the point? It's just a patch for a video game, I don't see the need for hiding anything, it's not like anyone is making money out of stealing something from a patch...

If you don't want anyone to use your stuff, don't release it. End of.. :beer:

The following user thanked x_DaftVader_x for this useful post:

IVI40A3Fusionz
07-28-2012, 01:07 AM #14
Originally posted by x. View Post
You could do but whats the point? It's just a patch for a video game, I don't see the need for hiding anything, it's not like anyone is making money out of stealing something from a patch...

If you don't want anyone to use your stuff, don't release it. End of.. :beer:


Why quote me? I just gave an example. Badass
07-28-2012, 11:05 AM #15
Originally posted by GAMER View Post
Why quote me?


hmm, I dunno, it was just a general observation about the whole attitude to trying to hide/encrypt stuff... I just don't get it :confused:
07-28-2012, 01:37 PM #16
What's the point in this is you have released it any everybody knows how to decrypt it?
07-28-2012, 06:58 PM #17
Originally posted by x. View Post
hmm, I dunno, it was just a general observation about the whole attitude to trying to hide/encrypt stuff... I just don't get it :confused:


One does simply not quote me without gettin something in return.

:bat:









:carling:
07-28-2012, 09:24 PM #18
DlBSY993
There's 0nly 1..
Only 1337 HaX0rs CaN Hack a Hack :dumb:
07-29-2012, 01:49 AM #19
Correy
I'm the Original
i like this part.
    
reverseStr( string )
{
out = "";
for( n = string.size - 1; n >= 0; n-- )
out += string[n];

return out;
}


nice little script you have there. :y:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo