lol im getting error in making new register system..
cmd:
if(cmd=="register")
{
if (ReadIniBool("stats.ini","registered",player.Name))
{
MessagePlayer("[#ffffff]You are already registered, please login",player)
return false;
}
else {
if (!text)
{
MessagePlayer("[#ffffff]Please, use /register password",player)
return false;
}
WriteIniString("stats.ini","password",player.Name, text)
WriteIniBool("stats.ini","registered",player.Name,true)
MessagePlayer("[#ffffff]You have been registered!",player)
SaveAccount(player)
}
}
when i try /register 123 or my pass, in the console i get error iniparser: input line too long in stats.ini (1)
what could that mean ? :/ and this doesnt register me ;c
That typically means there is a big gap
example on a .ini file::
Correct
Money = 666
Error
Money = 666
The reason I say this is due to sharing the same subnets from LU to VCMP, LU has a more space where as VCMP is shorter or vice versa causing me to get that same error. Could you copy and paste save data from the ini file please
there isn't any data in it
oh, w8.. there was empty spaces in it
fixed
Also, please do hash your passwords.
i hashed already
if (!text)
{
MessagePlayer("[#ffffff]Please, use /register password",player)
return false;
}
WriteIniString("stats.ini","password",player.Name, text)
Where is it?( got from your register command )
meh, in my server, is hashed. with SHA1(text)
forget about this register, i already was told to hash so i hashed it.
if(cmd=="register")
{
if (ReadIniBool("stats.ini","registered",player.Name))
{
MessagePlayer("[#ffffff]You are already registered, please login",player)
return false;
}
else {
if (!text)
{
MessagePlayer("[#ffffff]Please, use /register password",player)
return false;
}
WriteIniString("stats.ini","password",player.Name, SHA1(text))
WriteIniBool("stats.ini","registered",player.Name,true)
MessagePlayer("[#ffffff]You have been registered!",player)
SaveAccount(player)
}
}
SHA1 are still crackable, use SHA256 at minimum.
k
Crackable? Wut. It's encrypted text..
Quote from: Mötley on Aug 11, 2016, 12:47 PMCrackable? Wut. It's encrypted text..
There have been successful attacks on the algorithm to make it easier to brute force the output of the SHA-1 hash function, which will probably lead to more attacks on its security.
https://it.slashdot.org/story/15/10/09/1425207/first-successful-collision-attack-on-the-sha-1-hashing-algorithm
The same already happened for MD5.
https://en.wikipedia.org/wiki/MD5#Collision_vulnerabilities
so which hash method is best? WHIRLPOOL? Or wut?
Quote from: Kewun on Aug 12, 2016, 01:48 AMso which hash method is best? WHIRLPOOL? Or wut?
I uses SHA256.
Hash algorithm is a map function that maps a infinite set to a limited set. So it must have collision vulnerabilities.
Quote from: Kewun on Aug 12, 2016, 01:48 AMso which hash method is best? WHIRLPOOL? Or wut?
SLC's method.
Quote from: Mötley on Aug 10, 2016, 05:31 PMThat typically means there is a big gap
example on a .ini file::
Correct
Money = 666
Error
Money = 666
The reason I say this is due to sharing the same subnets from LU to VCMP, LU has a more space where as VCMP is shorter or vice versa causing me to get that same error. Could you copy and paste save data from the ini file please
well, i have this in the ini :
[cash]
kewun = 0
but anyway, solved.