[isf-wifidog] admin account recovery (Raul Muñoz)

Raúl Muñoz rmunyoz at cilma.net
Mar 18 Mai 03:06:40 EDT 2010


the user passwd is encoded and crypted in md5 and base64 so it is not possible to recover the original password (as this encoding is one way only) 
Thus we've got to create a new password, for example I use ipython in linux this way: 

cilma at wifidog-pruebas:~$ ipython 
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
Type "copyright", "credits" or "license" for more information. 
IPython 0.9.1 -- An enhanced Interactive Python. 
In [1]: import hashlib; 
In [2]: import base64; 
In [3]: base64.b64encode(hashlib.md5(' new_password ').digest()) 
Out[3]: 'Swkgyj75Sxeclhnjf1Wn5Q==' 

As in the 3th line we passed the new password and received the hash key, we can now update that field in the database for the current user at the users table. 

cilma at wifidog-pruebas:~$ psql -U cilma -d wifidog 
Bienvenido a psql 8.3.8, la terminal interactiva de PostgreSQL. 
wifidog=# update users set pass='4AzyWtQmg7PfZ4xh9Cxr2g==' where username = 'admin'; 
UPDATE 1 
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://listes.ilesansfil.org/pipermail/wifidog/attachments/20100518/ba16c8b4/attachment.htm>


More information about the WiFiDog mailing list