-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardwareserverupgrade.py
70 lines (63 loc) · 1.99 KB
/
hardwareserverupgrade.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
65
66
67
68
69
70
import requests
import time
from bs4 import BeautifulSoup
global s
global IDs
IDs = list()
PHPSESS = input("Enter the PHPSESSID: ")
s = requests.Session()
s.cookies.update ({
"PHPSESSID" : PHPSESS,
})
s.headers.update({"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"})
acc = int(input("Enter bank account: ")
def FindHardWareID():
hardwardURL = 'https://legacy.hackerexperience.com/hardware'
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 '4 GHz' in l.text:
print("Skipping | Server already upgraded")
else:
data = (l['href'])
dat = data.split('&id=')[1]
IDs.append(dat)
def UpgradeHardWare(acc):
for ID in IDs:
url = 'https://legacy.hackerexperience.com/hardware?opt=upgrade&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':'hdd',
'part-id':6,
'price':8000
}
s.post(hurl,payload)
payload = {
'acc':acc,
'act':'cpu',
'part-id':8,
'price':5000
}
url = 'https://legacy.hackerexperience.com/hardware?opt=upgrade&id='+ID
s.get(url) #HE likes to be random and makes us load the page before request can go through
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()