# HG changeset patch # User kevin@localhost.localdomain # Date 1225787230 -28800 # Node ID 7107c26ba197d4936b3ae4429dc0a1558ba10801 # Parent 785c89e5db32f56de403de4688ae953602397937 Add class CreateAccount. this class is not finsh yet. diff -r 785c89e5db32 -r 7107c26ba197 pyikriam/ikariam.py --- a/pyikriam/ikariam.py Tue Nov 04 16:01:25 2008 +0800 +++ b/pyikriam/ikariam.py Tue Nov 04 16:27:10 2008 +0800 @@ -25,6 +25,30 @@ pass pass +class CreateAccount: + """ + For create sheep to cheat. take care of the ip address & email check by yourself. + """ + def __init__(self,account,email,password,server): + self.account=account + self.password=password + self.server=server + self.email=email + headers=[('Referer','http://'+self.server[self.server.find('.')+1:]+'/register.php')] + self.browser = fake_moz(headers) + urllib2.install_opener(self.browser) + pass + + def ca(self): + self.baseurl='http://'+self.server + params = { + "function":"createAvatar",\ + "name":self.account,\ + "email":self.email,\ + "password":self.password,\ + "agb":"on"} + ret=c(self.baseurl+'/index.php?action=newPlayer').get(params).get_content() + pass class Ikariam: