Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cherrypy
- from random import randint
- from colorama import Fore, Back, Style
- class Emulator(object):
- def __init__(self):
- print Fore.BLUE + "Project Storm Emulator" + "\n" + " Version: 0.1a"
- self.o = randint(0, 999)
- @cherrypy.expose()
- def index(self):
- return 'home'
- @cherrypy.expose()
- def newstext(self):
- return "Take Over News"
- @cherrypy.expose()
- def checkip(self):
- print "\n" + Fore.RED + "Online Check Passed"
- return '<html><head><title>Current IP Check</title></head><body>Current IP Address: 0.0.0.0</body></html>' \
- @cherrypy.expose()
- def orders(self, uin):
- return "completed"
- @cherrypy.expose
- def login(self, uin, password, hash, eip):
- print "\n" + Fore.GREEN + "Generating order number"
- print "\n" + Fore.GREEN + "Your magic number is %s" % self.o
- print "\n" + "___Checking Credentials___" + "\n" + "\n" + "User: " + uin + "\n" + "Pass: " + password + "\n" + "Hash: " + hash + "\n" + "Ip Addr: " + eip
- return '%s' % self.o
- def _cp_dispatch(self, vpath):
- cherrypy.log.error('_cp_dispatch: ' + str(vpath))
- if len(vpath) == 0:
- return vpath
- if len(vpath) == 1:
- print Fore.BLUE + 'Gathering Information...'
- cherrypy.request.params['uin'] = vpath.pop(0)
- cherrypy.request.params['pass'] = vpath.pop(0)
- cherrypy.request.params['hash'] = vpath.pop(0)
- cherrypy.request.params['eip'] = vpath.pop(0)
- return self.login
- if len(vpath) == 2:
- cherrypy.request.params['uin'] = vpath.pop(0)
- return self.orders
- return vpath
- if __name__ == '__main__':
- cherrypy.config.update({'environment': 'production'})
- cherrypy.quickstart(Emulator())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement