Merge pull request #623 from tdh8316/master

Use `is` operator when comparing singletons.
This commit is contained in:
Christopher Kent Hoadley 2020-05-24 06:08:42 -05:00 committed by GitHub
commit 3c454794ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -218,7 +218,7 @@ class QueryNotifyPrint(QueryNotify):
else: else:
print(f"[-] {self.result.site_name}: {self.result.context} ") print(f"[-] {self.result.site_name}: {self.result.context} ")
elif result.status == QueryStatus.ILLEGAL: elif result.status == QueryStatus.ILLEGAL:
if self.print_found_only == False: if not self.print_found_only:
msg = "Illegal Username Format For This Site!" msg = "Illegal Username Format For This Site!"
if self.color: if self.color:
print((Style.BRIGHT + Fore.WHITE + "[" + print((Style.BRIGHT + Fore.WHITE + "[" +

View file

@ -255,7 +255,7 @@ def sherlock(username, site_data, query_notify,
allow_redirects = True allow_redirects = True
# This future starts running the request in a new thread, doesn't block the main thread # This future starts running the request in a new thread, doesn't block the main thread
if proxy != None: if proxy is not None:
proxies = {"http": proxy, "https": proxy} proxies = {"http": proxy, "https": proxy}
future = request_method(url=url_probe, headers=headers, future = request_method(url=url_probe, headers=headers,
proxies=proxies, proxies=proxies,
@ -499,11 +499,11 @@ def main():
# Argument check # Argument check
# TODO regex check on args.proxy # TODO regex check on args.proxy
if args.tor and (args.proxy != None): if args.tor and (args.proxy is not None):
raise Exception("Tor and Proxy cannot be set at the same time.") raise Exception("Tor and Proxy cannot be set at the same time.")
# Make prompts # Make prompts
if args.proxy != None: if args.proxy is not None:
print("Using the proxy: " + args.proxy) print("Using the proxy: " + args.proxy)
if args.tor or args.unique_tor: if args.tor or args.unique_tor:
@ -603,7 +603,7 @@ def main():
file.write(dictionary["url_user"] + "\n") file.write(dictionary["url_user"] + "\n")
file.write(f"Total Websites Username Detected On : {exists_counter}") file.write(f"Total Websites Username Detected On : {exists_counter}")
if args.csv == True: if args.csv:
with open(username + ".csv", "w", newline='', encoding="utf-8") as csv_report: with open(username + ".csv", "w", newline='', encoding="utf-8") as csv_report:
writer = csv.writer(csv_report) writer = csv.writer(csv_report)
writer.writerow(['username', writer.writerow(['username',

View file

@ -208,7 +208,7 @@ class SitesInformation():
List of strings containing names of sites. List of strings containing names of sites.
""" """
if popularity_rank == True: if popularity_rank:
#Sort in ascending popularity rank order. #Sort in ascending popularity rank order.
site_rank_name = \ site_rank_name = \
sorted([(site.popularity_rank,site.name) for site in self], sorted([(site.popularity_rank,site.name) for site in self],