more refactoring done

pull/1283/head
MoMMde 3 years ago
parent 4a47616cc6
commit 68e547b5da
No known key found for this signature in database
GPG Key ID: EBD6BDF2493425AC

@ -20,7 +20,7 @@ if __name__ == "__main__":
major = sys.version_info[0] major = sys.version_info[0]
minor = sys.version_info[1] minor = sys.version_info[1]
python_version = str(sys.version_info[0])+"."+str(sys.version_info[1])+"."+str(sys.version_info[2]) python_version = major + "." + minor + "." + str(sys.version_info[2])
if major != 3 or major == 3 and minor < 6: if major != 3 or major == 3 and minor < 6:
print("Sherlock requires Python 3.6+\nYou are using Python %s, which is not supported by Sherlock" % (python_version)) print("Sherlock requires Python 3.6+\nYou are using Python %s, which is not supported by Sherlock" % (python_version))

@ -173,9 +173,8 @@ class QueryNotifyPrint(QueryNotify):
""" """
self.result = result self.result = result
if self.verbose == False or self.result.query_time is None: response_time_text = ""
response_time_text = "" if self.verbose == True or self.result.query_time is not None:
else:
response_time_text = f" [{round(self.result.query_time * 1000)} ms]" response_time_text = f" [{round(self.result.query_time * 1000)} ms]"
# Output to the terminal is desired. # Output to the terminal is desired.

@ -244,7 +244,7 @@ def sherlock(username, site_data, query_notify,
request_method = net_info.get("request_method") request_method = net_info.get("request_method")
request_payload = net_info.get("request_payload") request_payload = net_info.get("request_payload")
request = None request = None
if request_method is not None: if request_method is not None:
if request_method == "GET": if request_method == "GET":
request = session.get request = session.get

@ -3,11 +3,8 @@
This module supports storing information about web sites. This module supports storing information about web sites.
This is the raw data that will be used to search for usernames. This is the raw data that will be used to search for usernames.
""" """
import os
import json import json
import operator
import requests import requests
import sys
class SiteInformation(): class SiteInformation():
@ -117,7 +114,8 @@ class SitesInformation():
if not data_file_path.lower().endswith(".json"): if not data_file_path.lower().endswith(".json"):
raise FileNotFoundError(f"Incorrect JSON file extension for data file '{data_file_path}'.") raise FileNotFoundError(f"Incorrect JSON file extension for data file '{data_file_path}'.")
if "http://" == data_file_path[:7].lower() or "https://" == data_file_path[:8].lower(): if data_file_path.lower().startswith("http"):
#if "http://" == data_file_path[:7].lower() or "https://" == data_file_path[:8].lower():
# Reference is to a URL. # Reference is to a URL.
try: try:
response = requests.get(url=data_file_path) response = requests.get(url=data_file_path)

Loading…
Cancel
Save