Advertisement
truongtuanbang

Simple XSS Fuzzer

Aug 4th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. Simple XSS Fuzzer
  2.  
  3. #!!/usr/bin/python
  4. # -*- coding: utf-8 -*-
  5. """
  6. Created on Tue Aug  4 13:31:47 2015
  7.  
  8. @author: johto
  9. please input url: http://domain.com/?id=[x]
  10. """
  11. from bs4 import BeautifulSoup
  12. import urllib
  13.  
  14.  
  15. furl = raw_input("Please enter URL: ")
  16. url = furl.split('?')
  17. payload = '--"--><johto>"(bingo[])"</johto>'
  18. exploit = url[1].replace('[x]',payload)
  19.  
  20. if  furl.find('?')>0 :
  21.     #item=url[1]
  22.     #print url[1].split('&')
  23.    
  24.    args={}
  25.    for item in exploit.split('&'):
  26.        args[item.split('=')[0]] = item.split('=')[1]
  27.  
  28.  
  29.  
  30. hack = urllib.urlopen(str(url[0]) +'?' + urllib.urlencode(args))
  31. html= BeautifulSoup(hack.read(),"lxml")
  32. print html.find_all('johto')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement