Skip to content

Commit

Permalink
Add ability to search a single domain within CSE (via siteSearch)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgor committed Jan 6, 2017
1 parent 4d42d92 commit f4e344a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dork-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import time
import argparse

domain = ''
engine = ''
key = ''
max_queries = 10
Expand All @@ -21,6 +22,8 @@

def main():
parser = argparse.ArgumentParser(description='Find dynamic pages via Google dorks.')
parser.add_argument('-d', '--domain', default=domain,
help='Specific domain to search (instead of all domains defined in CSE)')
parser.add_argument('-e', '--engine', default=engine,
help='Google custom search engine id (cx value)')
parser.add_argument('-f', '--filetypes', nargs='?', default=[],
Expand All @@ -45,6 +48,7 @@ def main():
data = {}
data['key'] = args.key
data['cx'] = args.engine
data['siteSearch'] = args.domain
data['q'] = ' '.join(args.terms)
if args.filetypes:
filetypes = args.filetypes.split(',')
Expand Down

0 comments on commit f4e344a

Please sign in to comment.