Guest User

Untitled

a guest
Apr 14th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.15 KB | None | 0 0
  1. from BeautifulSoup import BeautifulSoup
  2. import urllib2
  3. from time import sleep
  4. import argparse
  5. #arguments parse
  6. parser = argparse.ArgumentParser()
  7.  
  8. parser.add_argument("-o", "--output",dest ="output", help="output location", default="output.txt")
  9. args = parser.parse_args()
  10. #
  11. parser = argparse.ArgumentParser()
  12. print(r"""                                                                                                        
  13.  
  14.                                               /$$           /$$          
  15.                                              | $$          |__/          
  16.  /$$$$$$$  /$$$$$$   /$$$$$$   /$$$$$$   /$$$$$$$ /$$   /$$ /$$ /$$   /$$
  17. /$$_____/ /$$__  $$ /$$__  $$ /$$__  $$ /$$__  $$|  $$ /$$/| $$|  $$ /$$/
  18. |  $$$$$$ | $$  \ $$| $$$$$$$$| $$$$$$$$| $$  | $$ \ $$$$/ | $$ \ $$$$/
  19. \____  $$| $$  | $$| $$_____/| $$_____/| $$  | $$  >$$  $$ | $$  >$$  $$
  20. /$$$$$$$/| $$$$$$$/|  $$$$$$$|  $$$$$$$|  $$$$$$$ /$$/\ $$| $$ /$$/\ $$
  21. |_______/ | $$____/  \_______/ \_______/ \_______/|__/  \__/|__/|__/  \__/
  22.          | $$                                                            
  23.          | $$                                                            
  24.          |__/            
  25.  
  26. name: google-sqli-parser
  27.  
  28. version:  0.0.1  
  29.  
  30. author: speedxix0202
  31.  
  32. url: https://speedxix0202.ct8.pl/
  33.     """)
  34. sleep(0.3)
  35. counter=0
  36. counterstring = str(counter)
  37.  
  38. f = open(args.output,'a')
  39.  
  40. while counter < 200:
  41.     counter = counter+10
  42.     counterstring = str(counter)
  43.     site= "http://www.google.com/search?q=inurl:index.php?id=&start=" + counterstring
  44.     hdr = {'User-Agent': '',
  45.            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  46.            'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
  47.            'Accept-Encoding': 'none',
  48.            'Accept-Language': 'en-US,en;q=0.8',
  49.            'Connection': 'keep-alive'}
  50.     req = urllib2.Request(site)
  51.  
  52.     try:
  53.         page = urllib2.urlopen(req).read()
  54.         soup = BeautifulSoup(page)
  55.         ka=soup.findAll('cite',attrs={'class':'iUh30'}
  56.             for i in ka:
  57.             print i.text
  58.             f.write(i.text)
  59.         print site
  60.     except urllib2.HTTPError, e:
  61.         print e.fp.read()
  62. f.close()
Add Comment
Please, Sign In to add comment