Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if u like this application share with your friends
- #visit www.teamopenfire.com for TeamOpenFire's Security tools and tutorials
- #visit my personal blog: www.suckthetech.blogspot.com
- import cookielib
- import urllib2
- from urllib2 import Request, build_opener, HTTPCookieProcessor, HTTPHandler
- import socket
- import httplib
- try:
- print "\t################################################################"
- print "\t# www.teamopenfire.com #"
- print "\t# ############### ######## ############ #"
- print "\t# # # ## ## # # #"
- print "\t# ###### ###### ## ## # ######## #"
- print "\t# # # ## ## # # #"
- print "\t# # # ## ## # ##### #"
- print "\t# # # ## ## # ##### #"
- print "\t# # # ## ## # # #"
- print "\t# # # ## ## # # #"
- print "\t# ##### [#] ######## [#] ##### #"
- print "\t# Cookie Grabber #"
- print "\t# coded by Ajith KP #"
- print "\t# Greets to Coded32 and T.O.F members #"
- print "\t################################################################"
- try:
- site=raw_input("URL [include http:// | https://]: ")
- check = site
- check = check.replace("http://","")
- check = check.replace("https://","")
- print ("\tChecking website " + check + "...")
- conn = httplib.HTTPConnection(check)
- conn.connect()
- print "\t[$] Yes... Server is Online."
- except (httplib.HTTPResponse, socket.error) as Exit:
- print("\t [!] Oops Error occured")
- raw_input("\t [!] Possible problems: Server offline, Invalid URL,Internet offline")
- exit()
- except(IOError):
- print "URL not found"
- print "\nTrying To Capture Cookies..."
- cookiez = cookielib.CookieJar()
- opener = build_opener(HTTPCookieProcessor(cookiez), HTTPHandler())
- opener.addheaders = [
- ('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13'),
- ('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'),
- ('Accept-Language', 'en-gb,en;q=0.5'),
- ('Accept-Encoding', 'gzip,deflate'),
- ('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'),
- ('Keep-Alive', '115'),
- ('Connection', 'keep-alive'),
- ('Cache-Control', 'max-age=0'),
- ('Referer', site),
- ]
- req = Request(site)
- cookievalue = opener.open(req)
- html = cookievalue.read()
- print "\n\nCookies Loaded are: \n\n"
- for cookie in cookiez:
- print "\t\n[+]",cookie
- except (KeyboardInterrupt, SystemExit):
- print "\n\t[!] Session cancelled"
- except (socket.error):
- print "\t\n[!] Session Cancelled; Error occured. Check internet settings"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement