Mercurial > eagle-eye
view pyikriam/createAccount.py @ 222:4a051d178456
mreged.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 04 Nov 2008 18:33:49 +0800 |
parents | 5fa938cbe058 |
children | f3502833be7c |
line wrap: on
line source
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() """