poliva / ggposrv

Unofficial ggpo server (re)implementation
GNU General Public License v2.0
128 stars 41 forks source link

Ayuda Help #15

Closed Zehcarioca closed 9 years ago

Zehcarioca commented 9 years ago

desculpame se estoy escreviendo en el lugar errado, pero necesito de una mano. Estoy armando un servidor de GGPO pero no se que esta pasando, por que la hacer login en la aplicacion sale la informacion de wrong password:, pero como yo debo cifrar la clave y cual tipo de salt debo usar en la base de datos. mira abajo el log del error en el servidor.

2015-04-14 22:37:09,316:INFO:[None@192.168.1.6:61958#lobby/None(None)] Client connected 2015-04-14 22:37:09,316:INFO:[None@192.168.1.6:61958#lobby/None(None)] SEQUENCE: 1 COMMAND: connect 2015-04-14 22:37:09,316:INFO:[None@192.168.1.6:61958#lobby/None(None)] SEQUENCE: 2 COMMAND: auth 2015-04-14 22:37:09,317:INFO:[None@192.168.1.6:61958#lobby/None(None)] wrong password: zeh 2015-04-14 22:37:09,617:INFO:[None@192.168.1.6:61958#lobby/None(None)] Client disconnected Saludos Cordiales

excuse me if I am writing in the wrong place, but I need a hand. I'm putting together a server but not GGPO is happening, because the login in the application goes the wrong password information :, but as I encrypt the key and what kind of salt should I use in the database. looking down the error log on the server.

2015-04-14 22:37:09,316:INFO:[None@192.168.1.6:61958#lobby/None(None)] Client connected 2015-04-14 22:37:09,316:INFO:[None@192.168.1.6:61958#lobby/None(None)] SEQUENCE: 1 COMMAND: connect 2015-04-14 22:37:09,316:INFO:[None@192.168.1.6:61958#lobby/None(None)] SEQUENCE: 2 COMMAND: auth 2015-04-14 22:37:09,317:INFO:[None@192.168.1.6:61958#lobby/None(None)] wrong password: zeh 2015-04-14 22:37:09,617:INFO:[None@192.168.1.6:61958#lobby/None(None)] Client disconnected

Regards

Zehcarioca commented 9 years ago

I am trying to create the password with the code below, but I always get the message login failed wrong password, why? can anyone help me.

import os import hashlib import getpass import base64

password1 = None password2 = None

Read the password

while password1 != password2 or password1 == None: password1 = getpass.getpass() password2 = getpass.getpass("Confirm password: ") if (password1 != password2): print "\nPassword mismatch, try again."

Generate a 6 byte random salt

salt = os.urandom(6)

Hash our password + salt

sha = hashlib.sha512() sha.update(password1) sha.update(salt) ssha512 = base64.b64encode('{}{}'.format(sha.digest(), salt))

print "\n{{SSHA512}}{}".format(ssha512)

Best regards

Zehcarioca commented 9 years ago

got it