Advertisement
Guest User

Untitled

a guest
Mar 9th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. import cherrypy
  2. from random import randint
  3. from colorama import Fore, Back, Style
  4.  
  5.  
  6. class Emulator(object):
  7. def __init__(self):
  8. print Fore.BLUE + "Project Storm Emulator" + "\n" + " Version: 0.1a"
  9. self.o = randint(0, 999)
  10. @cherrypy.expose()
  11. def index(self):
  12. return 'home'
  13.  
  14. @cherrypy.expose()
  15. def newstext(self):
  16. return "Take Over News"
  17.  
  18. @cherrypy.expose()
  19. def checkip(self):
  20. print "\n" + Fore.RED + "Online Check Passed"
  21. return '<html><head><title>Current IP Check</title></head><body>Current IP Address: 0.0.0.0</body></html>' \
  22.  
  23. @cherrypy.expose()
  24. def orders(self, uin):
  25. return "completed"
  26.  
  27. @cherrypy.expose
  28. def login(self, uin, password, hash, eip):
  29. print "\n" + Fore.GREEN + "Generating order number"
  30.  
  31. print "\n" + Fore.GREEN + "Your magic number is %s" % self.o
  32. print "\n" + "___Checking Credentials___" + "\n" + "\n" + "User: " + uin + "\n" + "Pass: " + password + "\n" + "Hash: " + hash + "\n" + "Ip Addr: " + eip
  33. return '%s' % self.o
  34.  
  35. def _cp_dispatch(self, vpath):
  36.  
  37. cherrypy.log.error('_cp_dispatch: ' + str(vpath))
  38.  
  39. if len(vpath) == 0:
  40. return vpath
  41.  
  42. if len(vpath) == 1:
  43. print Fore.BLUE + 'Gathering Information...'
  44. cherrypy.request.params['uin'] = vpath.pop(0)
  45. cherrypy.request.params['pass'] = vpath.pop(0)
  46. cherrypy.request.params['hash'] = vpath.pop(0)
  47. cherrypy.request.params['eip'] = vpath.pop(0)
  48. return self.login
  49.  
  50. if len(vpath) == 2:
  51. cherrypy.request.params['uin'] = vpath.pop(0)
  52. return self.orders
  53.  
  54. return vpath
  55.  
  56.  
  57.  
  58.  
  59. if __name__ == '__main__':
  60. cherrypy.config.update({'environment': 'production'})
  61. cherrypy.quickstart(Emulator())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement