mirror of
https://github.com/maldevel/EmailHarvester.git
synced 2024-11-14 20:15:47 +08:00
Update EmailHarvester.py
This commit is contained in:
parent
9fb6d6a304
commit
25760653b9
1 changed files with 4 additions and 4 deletions
|
@ -148,13 +148,13 @@ def checkProxyUrl(url):
|
||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
|
|
||||||
def limit_check(x):
|
def limit_type(x):
|
||||||
x = int(x)
|
x = int(x)
|
||||||
if x > 0:
|
if x > 0:
|
||||||
return x
|
return x
|
||||||
raise argparse.ArgumentTypeError("Minimum results limit is 1.")
|
raise argparse.ArgumentTypeError("Minimum results limit is 1.")
|
||||||
|
|
||||||
def engine_check(engine):
|
def engine_type(engine):
|
||||||
engines = 'all ask bing google yahoo'.split()
|
engines = 'all ask bing google yahoo'.split()
|
||||||
if engine in engines:
|
if engine in engines:
|
||||||
return engine
|
return engine
|
||||||
|
@ -207,8 +207,8 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
parser.add_argument("-d", '--domain', metavar='DOMAIN', dest='domain', type=str, help="Domain to search.")
|
parser.add_argument("-d", '--domain', metavar='DOMAIN', dest='domain', type=str, help="Domain to search.")
|
||||||
parser.add_argument("-s", '--save', metavar='FILE', dest='filename', type=str, help="Save the results into a TXT and XML file (both).")
|
parser.add_argument("-s", '--save', metavar='FILE', dest='filename', type=str, help="Save the results into a TXT and XML file (both).")
|
||||||
parser.add_argument("-e", '--engine', metavar='ENGINE', dest='engine', default="all", type=engine_check, help="Select search engine(google, bing, yahoo, ask, all).")
|
parser.add_argument("-e", '--engine', metavar='ENGINE', dest='engine', default="all", type=engine_type, help="Select search engine(google, bing, yahoo, ask, all).")
|
||||||
parser.add_argument("-l", '--limit', metavar='LIMIT', dest='limit', type=limit_check, default=100, help="Limit the number of results.")
|
parser.add_argument("-l", '--limit', metavar='LIMIT', dest='limit', type=limit_type, default=100, help="Limit the number of results.")
|
||||||
parser.add_argument('-u', '--user-agent', metavar='USER-AGENT', dest='uagent', type=str, help="Set the User-Agent request header.")
|
parser.add_argument('-u', '--user-agent', metavar='USER-AGENT', dest='uagent', type=str, help="Set the User-Agent request header.")
|
||||||
parser.add_argument('-x', '--proxy', metavar='PROXY', dest='proxy', type=checkProxyUrl, help='Setup proxy server (example: http://127.0.0.1:8080)')
|
parser.add_argument('-x', '--proxy', metavar='PROXY', dest='proxy', type=checkProxyUrl, help='Setup proxy server (example: http://127.0.0.1:8080)')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue