-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardwareupgrade.py
64 lines (55 loc) · 1.72 KB
/
hardwareupgrade.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import requests
import time
from bs4 import BeautifulSoup
global s
global IDs
IDs = list()
acc = int(input("Enter the bank acc number: "))
PHPSESS = input("Enter the PHPSESSID: ")
s = requests.Session()
s.headers.update({"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"})
s.cookies.update ({
"PHPSESSID" : PHPSESS,
})
def FindHardWareID():
hardwardURL = 'https://legacy.hackerexperience.com/hardware?opt=xhd'
html = s.get(hardwardURL)
html = html.text
soup = BeautifulSoup(html, 'html.parser')
ulclass = soup.find_all('ul', {'class': 'list'})
for link in ulclass:
href = link.findAll('a')
for l in href:
if '1 GB' in l.text:
print("Skipping | External HD already upgraded")
else:
data = (l['href'])
print(data)
dat = data.split('&id=')[1]
IDs.append(dat)
def UpgradeHardWare(acc):
for ID in IDs:
url = 'https://legacy.hackerexperience.com/hardware?opt=xhd&id='+ID
s.get(url) #HE likes to be random and makes us load the page before request can go through
hurl = 'https://legacy.hackerexperience.com/hardware'
payload = {
'acc':acc,
'act':'xhd',
'part-id':3,
'price':500
}
s.post(hurl,payload)
print("Hardware ID: ",ID," upgraded!")
def clearLogs():
logUrl = "https://legacy.hackerexperience.com/logEdit"
payload = {
'id':1,
'log':''
}
response = s.post(logUrl,payload)
newURL = response.url
time.sleep(4)
Log = s.get(newURL)
FindHardWareID()
UpgradeHardWare(acc)
clearLogs()