# HG changeset patch # User kevin@tombear.tombears.com # Date 1225825696 -28800 # Node ID c0b9604b0be9325e36f4c4384adf336d1159e976 # Parent 2d65c786084e94c524e49e9e215181576d528acd the currect version of last bug fix diff -r 2d65c786084e -r c0b9604b0be9 pyikriam/createAccount.py --- a/pyikriam/createAccount.py Wed Nov 05 01:10:48 2008 +0800 +++ b/pyikriam/createAccount.py Wed Nov 05 03:08:16 2008 +0800 @@ -10,6 +10,9 @@ def __init__(self,account,password,server): self.account=account self.password=password + if len(self.password)<8: + print 'Password size mast bigger then 8 chars' + pass self.server=server headers=[('Referer','http://'+self.server[self.server.find('.')+1:]+'/register.php')] self.browser = fake_moz(headers) @@ -24,7 +27,6 @@ "email":self.account+"@ossug.org",\ "password":self.password,\ "agb":"on"} - print 'debug 10' self.ret=c(self.baseurl+'/index.php?action=newPlayer').get(params).get_content() print "Waiting for 30 seconds to get confirme..." time.sleep(30) @@ -47,8 +49,8 @@ for thread in folder: #thread.id, len(thread), thread.subject account=string.split(thread.subject)[0] - print account, - if account==self.account: + acsize=len(self.account) + if account[-acsize:]==self.account: print "find "+account for msg in thread: mmsg=email.message_from_string(msg.source) @@ -56,8 +58,8 @@ for x in string.split(confcontext): if x[0:7]=='http://': confurl=x - print "got confirme url..." break + print "send confirme." self.ret=c(confurl).get().get_content() pass @@ -68,6 +70,6 @@ """ -ikariamca=CreateAccount('laswnny','wtaaa123','s4.ikariam.tw') +ikariamca=CreateAccount('jdanny','taaaa123','s4.ikariam.tw') a=ikariamca.ca()