Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. import requests
  2. import time
  3. from bs4 import BeautifulSoup
  4.  
  5.  
  6. global s
  7. global IDs
  8. IDs = list()
  9. acc = int(input("Enter the bank acc number: "))
  10. PHPSESS = input("Enter the PHPSESSID: ")
  11. s = requests.Session()
  12. s.cookies.update ({
  13. "PHPSESSID" : PHPSESS,
  14. })
  15.  
  16.  
  17. def FindHardWareID():
  18. hardwardURL = 'https://legacy.hackerexperience.com/hardware?opt=xhd'
  19. html = s.get(hardwardURL)
  20. html = html.text
  21. soup = BeautifulSoup(html, 'html.parser')
  22. ulclass = soup.find_all('ul', {'class': 'list'})
  23. for link in ulclass:
  24. href = link.findAll('a')
  25. for l in href:
  26. if '1 GB' in l.text:
  27. print("Skipping | External HD already upgraded")
  28. else:
  29. data = (l['href'])
  30. print(data)
  31. dat = data.split('&id=')[1]
  32. IDs.append(dat)
  33.  
  34.  
  35.  
  36. def UpgradeHardWare(acc):
  37. for ID in IDs:
  38. url = 'https://legacy.hackerexperience.com/hardware?opt=xhd&id='+ID
  39. s.get(url) #HE likes to be random and makes us load the page before request can go through
  40. hurl = 'https://legacy.hackerexperience.com/hardware'
  41. payload = {
  42. 'acc':acc,
  43. 'act':'xhd',
  44. 'part-id':3,
  45. 'price':500
  46. }
  47. s.post(hurl,payload)
  48. print("Hardware ID: ",ID," upgraded!")
  49.  
  50. def clearLogs():
  51. logUrl = "https://legacy.hackerexperience.com/logEdit"
  52. payload = {
  53. 'id':1,
  54. 'log':''
  55. }
  56. response = s.post(logUrl,payload)
  57. newURL = response.url
  58. time.sleep(4)
  59. Log = s.get(newURL)
  60. FindHardWareID()
  61. UpgradeHardWare(acc)
  62. clearLogs()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement