added a --time-sec flag for the whois search, also caught an exception from whois

This commit is contained in:
ekultek 2017-11-07 11:58:29 -06:00
parent 7734f87e62
commit 55836461ea

10
zeus.py
View file

@ -139,6 +139,8 @@ if __name__ == "__main__":
help="Parse webcache URLs for the redirect in them")
search_items.add_option("--x-forward", dest="forwardedForRandomIP", action="store_true",
help="Add a header called 'X-Forwarded-For' with three random IP addresses")
search_items.add_option("--time-sec", dest="controlTimeout", metavar="SECONDS", type=int,
help="Control the sleep time to the WhoIS lookup to prevent errors")
# obfuscation options
anon = optparse.OptionGroup(parser, "Anonymity arguments",
@ -337,7 +339,7 @@ if __name__ == "__main__":
)
elif whois:
whois_lookup_main(
url, verbose=opt.runInVerbose
url, verbose=opt.runInVerbose, timeout=opt.controlTimeout
)
elif clickjacking:
clickjacking_main(url, agent=agent_to_use, proxy=proxy_to_use,
@ -565,6 +567,12 @@ if __name__ == "__main__":
))
request_issue_creation()
shutdown()
elif "HTTP Error 429: Too Many Requests" in str(e):
logger.fatal(set_color(
"WhoIs doesn't like it when you send to many requests at one time, "
"try updating the timeout with the --time-sec flag (IE --time-sec 10)", level=50
))
shutdown()
else:
logger.fatal(set_color(
"provided file does not exist, make sure you have the full path...", level=50