Author Topic: [Bluzone Private Mods] Script_RPChat V4 | Script_TelChat V3  (Read 23166 times)

Filename is "Script_RPChat(1)" instead of "Script_RPChat"
pretty sure that happens when you download it more than once. Just rename it.

technically doesn't even have to be renamed

Not really, you just prepend (and store) a random string to the password, which makes it harder to identify identical passwords (and makes brute-forcing it a bit slower, as well as making you need a bigger rainbow table to crack it).
for login, i would have to loop through all the salts and apply them to the input password to confirm they match, right?

my system isn't set up for that :/

for login, i would have to loop through all the salts and apply them to the input password to confirm they match, right?

my system isn't set up for that :/
You have one salt per password. There is no looping, you just store username+salt+sha(salt+password) instead of username+sha(password).

Code: [Select]
function registerRemoteUser(%name, %bl_id, %pass, %isadmin, %haseval) //register new user
{
$ValidUserNameList[%bl_id, "Name"] = %name;
$ValidUserNameList[%bl_id, "Pass"] = %pass;
$ValidUserNameList[%bl_id, "BLID"] = %BL_ID;
$ValidUserNameList[%bl_id, "IsAdmin"] = %isadmin;
$ValidUserNameList[%bl_id, "Eval"] = %haseval;
export("$ValidUserNameList*", "config/tcpUsers.cs");
}

becomes

Code: [Select]
function randstr(%len, %chr) //credit to ipquarx for giving me this months ago
{
if(!strLen(%chr))
{
%chr = "abcdefghijklmnopqrstuvwxyz1234567890";
}
%str = "";
%cln = strLen(%chr);
if(!strLen(%len) || %len < 1)
{
return %str;
}
for(%i = 0 ; %i < %len ; %i++)
{
%str = %str @ getSubStr(%chr, getRandom(0, %cln - 1), 1);
}
return %str;
}

function getSha1Password(%i)
{
%salt = randStr(getRandom(5, 10)); //might make these 10, 15. what's the harm :/
%hashed = sha1(%salt @ %password) TAB %salt;
}

function registerRemoteUser(%name, %bl_id, %pass, %isadmin, %haseval) //register new user
{
%hashed = getSha1Password(%pass);
$ValidUserNameList[%bl_id, "Name"] = %name;
$ValidUserNameList[%bl_id, "Pass"] = getField(%hashed, 0);
$ValidUserNameList[%bl_id, "BLID"] = %BL_ID;
$ValidUserNameList[%bl_id, "IsAdmin"] = %isadmin;
$ValidUserNameList[%bl_id, "Eval"] = %haseval;
$ValidUserNameList[%bl_id, "salt"] = getField(%hashed, 1);
export("$ValidUserNameList*", "config/tcpUsers.cs");
}
???

Telchat is released into what is essentially a public, untested beta.

it runs on $Pref::Server::Port + 25. If your server runs on 28000, it will run on 28025.

Will someone competent check to see if it's possibly to run it ON 28000? Kalphiter claims it is.

Code: [Select]
function registerRemoteUser(%name, %bl_id, %pass, %isadmin, %haseval) //register new user
{
$ValidUserNameList[%bl_id, "Name"] = %name;
$ValidUserNameList[%bl_id, "Pass"] = %pass;
$ValidUserNameList[%bl_id, "BLID"] = %BL_ID;
$ValidUserNameList[%bl_id, "IsAdmin"] = %isadmin;
$ValidUserNameList[%bl_id, "Eval"] = %haseval;
export("$ValidUserNameList*", "config/tcpUsers.cs");
}

becomes

Code: [Select]
function randstr(%len, %chr) //credit to ipquarx for giving me this months ago
{
if(!strLen(%chr))
{
%chr = "abcdefghijklmnopqrstuvwxyz1234567890";
}
%str = "";
%cln = strLen(%chr);
if(!strLen(%len) || %len < 1)
{
return %str;
}
for(%i = 0 ; %i < %len ; %i++)
{
%str = %str @ getSubStr(%chr, getRandom(0, %cln - 1), 1);
}
return %str;
}

function getSha1Password(%i)
{
%salt = randStr(getRandom(5, 10)); //might make these 10, 15. what's the harm :/
%hashed = sha1(%salt @ %password) TAB %salt;
}

function registerRemoteUser(%name, %bl_id, %pass, %isadmin, %haseval) //register new user
{
%hashed = getSha1Password(%pass);
$ValidUserNameList[%bl_id, "Name"] = %name;
$ValidUserNameList[%bl_id, "Pass"] = getField(%hashed, 0);
$ValidUserNameList[%bl_id, "BLID"] = %BL_ID;
$ValidUserNameList[%bl_id, "IsAdmin"] = %isadmin;
$ValidUserNameList[%bl_id, "Eval"] = %haseval;
$ValidUserNameList[%bl_id, "salt"] = getField(%hashed, 1);
export("$ValidUserNameList*", "config/tcpUsers.cs");
}
???
About right, but having the salt being a random string is pretty pointless; longer is always better.

made it 20 - 25 long...
very nice.

Can you make it so the RPChat doesn't always require last names?

Can you make it so the RPChat doesn't always require last names?
yes but why

It tends to get annoying, my roleplays dont always use last names but this script is very useful :L

ok fine
done
it's a rtb pref
« Last Edit: September 23, 2012, 02:50:59 PM by Lugnut »


Hm.

Lugnut, you thar.

Help me with this TelChat so i can hook it up to my Dedi.