# HG changeset patch # User kevin@tombear.tombears.com # Date 1225794508 -28800 # Node ID 5fa938cbe058462b46da32a8712bfe1c99f6a2e7 # Parent 7107c26ba197d4936b3ae4429dc0a1558ba10801 Class of account creater diff -r 7107c26ba197 -r 5fa938cbe058 pyikriam/createAccount.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyikriam/createAccount.py Tue Nov 04 18:28:28 2008 +0800 @@ -0,0 +1,47 @@ +import urllib2,urllib + +from ikariam import fake_moz +from lazy.www import c + +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"} + self.ret=c(self.baseurl+'/index.php?action=newPlayer').get(params).get_content() + pass + +class confirme: + def __init__(self,confirmeurl): + self.confirmeurl=confirmeurl + self.browser = fake_moz() + urllib2.install_opener(self.browser) + pass + + def run(self): + self.ret=c(self.confirmeurl).get().get_content() + pass + +""" +ikariamca=CreateAccount('someac','kevin@butyshop.com','contest123','s2.ikariam.tw') +a=ikariamca.ca() +confirme("http://s2.ikariam.tw/index.php?action=newPlayer&function=validateEmail&hash=c239c92a94690066078ca95c993d348b&id=70997").run() +""" + diff -r 7107c26ba197 -r 5fa938cbe058 pyikriam/ikariam.py --- a/pyikriam/ikariam.py Tue Nov 04 16:27:10 2008 +0800 +++ b/pyikriam/ikariam.py Tue Nov 04 18:28:28 2008 +0800 @@ -25,31 +25,6 @@ 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: cities = {}