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-29-2012, 04:20 PM #20
I like this a lot Winky Winky
07-30-2012, 10:51 AM #21
pcfreak30
>> PCFreak30.com Happy<<
Lets make a simple statement. String encryption will only ever be useful against leechers. Unless you actually WANT to know the decrypted data it is pointless because we can;'t eval in GSC.

Heres an an exercise. Use QuakeC to create an interpreted interpreted language. In laymans terms use GSC to create a new scripting language and interpreter for it. Benefit to that is the EVAL that you would need.. Happy.
07-30-2012, 09:16 PM #22
Jeremy
Former Staff
Originally posted by pcfreak30 View Post
Lets make a simple statement. String encryption will only ever be useful against leechers. Unless you actually WANT to know the decrypted data it is pointless because we can;'t eval in GSC.

Heres an an exercise. Use QuakeC to create an interpreted interpreted language. In laymans terms use GSC to create a new scripting language and interpreter for it. Benefit to that is the EVAL that you would need.. .
Im sorry..wat? :concentrate: :try:
08-01-2012, 09:55 PM #23
LightModz
League Champion
Originally posted by Choco View Post
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


Nice :O this is really helpful, hopefully more people will release there menus etc :]

---------- Post added at 04:55 PM ---------- Previous post was at 04:53 PM ----------

Originally posted by xYARDSALEx View Post
:confused: wat????


the screen shot shows your post count 1337
08-01-2012, 09:55 PM #24
LightModz
League Champion
Originally posted by xYARDSALEx View Post
:confused: wat????


the screen shot shows your post count 1337
08-09-2012, 07:21 AM #25
Iamme34
Do a barrel roll!
Yeah wonderful

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo