mirror of
https://github.com/sherlock-project/sherlock
synced 2024-11-27 06:10:34 +00:00
Merge pull request #623 from tdh8316/master
Use `is` operator when comparing singletons.
This commit is contained in:
commit
3c454794ff
3 changed files with 6 additions and 6 deletions
|
@ -218,7 +218,7 @@ class QueryNotifyPrint(QueryNotify):
|
|||
else:
|
||||
print(f"[-] {self.result.site_name}: {self.result.context} ")
|
||||
elif result.status == QueryStatus.ILLEGAL:
|
||||
if self.print_found_only == False:
|
||||
if not self.print_found_only:
|
||||
msg = "Illegal Username Format For This Site!"
|
||||
if self.color:
|
||||
print((Style.BRIGHT + Fore.WHITE + "[" +
|
||||
|
|
|
@ -255,7 +255,7 @@ def sherlock(username, site_data, query_notify,
|
|||
allow_redirects = True
|
||||
|
||||
# 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}
|
||||
future = request_method(url=url_probe, headers=headers,
|
||||
proxies=proxies,
|
||||
|
@ -499,11 +499,11 @@ def main():
|
|||
|
||||
# Argument check
|
||||
# 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.")
|
||||
|
||||
# Make prompts
|
||||
if args.proxy != None:
|
||||
if args.proxy is not None:
|
||||
print("Using the proxy: " + args.proxy)
|
||||
|
||||
if args.tor or args.unique_tor:
|
||||
|
@ -603,7 +603,7 @@ def main():
|
|||
file.write(dictionary["url_user"] + "\n")
|
||||
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:
|
||||
writer = csv.writer(csv_report)
|
||||
writer.writerow(['username',
|
||||
|
|
|
@ -208,7 +208,7 @@ class SitesInformation():
|
|||
List of strings containing names of sites.
|
||||
"""
|
||||
|
||||
if popularity_rank == True:
|
||||
if popularity_rank:
|
||||
#Sort in ascending popularity rank order.
|
||||
site_rank_name = \
|
||||
sorted([(site.popularity_rank,site.name) for site in self],
|
||||
|
|
Loading…
Reference in a new issue