[Pytbot-announce] Version 0.3.5 released
Status: Beta
Brought to you by:
protering
From: <pro...@us...> - 2004-08-02 00:06:58
|
This release addresses all bugs and feature requests to date. Color cards (mIRC codes) are enabled using 'p color'. Use 'p color' again to turn off the colors. User passwords are now encrypted. You must convert current passwords to encrypted form. Here's a small python program to do the conversion (put in your database username, password, dbname): ----------8<----CUT-HERE--------------------------- import MySQLdb from string import letters, digits from random import choice from crypt import crypt db = MySQLdb.connect(user='dbuser', passwd='dbpass', db='dbname') c = db.cursor() lines = c.execute("SELECT nick,password from player") recs = c.fetchmany() for (anick, apass) in recs: salt = choice(letters+digits) + choice(letters+digits) cpswd = crypt(apass, salt) print 'updating %s' % (anick,) c.execute("UPDATE player SET password='%s' where nick='%s'" % (cpswd, anick)) ----------8<----CUT-HERE--------------------------- Please let me know if you find any errors in the new version. Thanks! -Paul Rotering |