Skip to content

Instantly share code, notes, and snippets.

@seedprod
Created December 3, 2010 02:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seedprod/726483 to your computer and use it in GitHub Desktop.
Save seedprod/726483 to your computer and use it in GitHub Desktop.
Find out if your site can be found via google dorks
#Find out if your site can be found via google dorks
from BeautifulSoup import BeautifulSoup
import re
import urllib2
siteURL = "johndturner.com"
#get ghdb page. iterate through all links available
page = urllib2.urlopen("http://www.hackersforcharity.org/ghdb/")
soup = BeautifulSoup(page)
for item in soup.findAll('a', href=re.compile('^/ghdb\?function=*')):
newsoup = BeautifulSoup(str(item))
theurl = newsoup.a['href']
newurl = "http://www.hackersforcharity.org" + str(theurl)
hackpage = urllib2.urlopen(newurl)
hacksoup = BeautifulSoup(hackpage)
for item2 in hacksoup.findAll('a', href=re.compile('^/ghdb\?function=detail*')):
#print BeautifulSoup(str(item2)).a['href']
newsoup2 = BeautifulSoup(str(item2))
theurl2 = newsoup2.a['href']
newurl2 = "http://www.hackersforcharity.org" + str(theurl2)
dork = urllib2.urlopen(newurl2)
dorksoup = BeautifulSoup(dork)
for item3 in dorksoup.findAll('a', href=re.compile('^http://www.google.com*')):
#add any url parameters you want here to build the url. (i.e. email address, sitename)
#googleURL = BeautifulSoup(str(item3)).a['href'] + "+AND+inurl:" + siteURL
print BeautifulSoup(str(item3)).a['href'] + "+AND+inurl:" + siteURL
Copy link

ghost commented Apr 23, 2016

Nice
But, if you want to become a google dorks expert.
you must need to watch this video -
here is the link => https://www.youtube.com/watch?v=B9xJ54aGppc & https://www.youtube.com/watch?v=VSZyeYnZk3c

What You will learn from this video ?

*how google dorks works
*how to use google dorks for penetration testing
*how to use google dorks for security searching
*how much google dorks is powerful
*find vulnerable website using google dorks
*find someones information with google dorks
*how to use google dorks for information gathering
*database exploit with google dorks
*how to become a expert of google dorks searcher
*do mastering at google dorks

A thanks is more appreciate :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment