iniparser: input line too long in stats.ini (1)

Started by Kewun, Aug 10, 2016, 05:13 PM

Previous topic - Next topic

Kewun

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

Mötley

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

Kewun


Kewun



KAKAN

oh no

Kewun


KAKAN

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 )
oh no

Kewun

meh, in my server, is hashed. with SHA1(text)

forget about this register, i already was told to hash so i hashed it.

Kewun

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)
  }
 }

KAKAN

SHA1 are still crackable, use SHA256 at minimum.
oh no


Mötley


Stormeus

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

Kewun

so which hash method is best? WHIRLPOOL?  Or wut?