Skip to content

Instantly share code, notes, and snippets.

@farukuzun
Created May 24, 2013 01:20
Show Gist options
  • Save farukuzun/5640708 to your computer and use it in GitHub Desktop.
Save farukuzun/5640708 to your computer and use it in GitHub Desktop.
from mechanize import Browser
url = "http://xss.progphp.com/"
forms = []
br = Browser()
br.set_handle_robots(False)
br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]
page = br.open(url)
for link in br.links():
print link
try:
req = br.click_link(link)
br.open(req)
except:
pass
for form in br.forms():
print form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment