small changes final check

pull/1298/head
aristotelis gkithkopoulos 3 years ago
parent 7a375eba86
commit 8f9770fb05

@ -222,6 +222,29 @@ class QueryNotifyPrint(QueryNotify):
f"site '{self.result.site_name}'") f"site '{self.result.site_name}'")
return return
def finish(self, message="The processing has been finished."):
"""Notify Start.
Will print the last line to the standard output.
Keyword Arguments:
self -- This object.
message -- The last phrase.
Return Value:
Nothing.
"""
title = "End"
print('\r') # An empty line between last line of main output and last line(more clear output)
print(Style.BRIGHT + Fore.GREEN + "[" +
Fore.YELLOW + "!" +
Fore.GREEN + f"] {title}" +
Fore.GREEN + ": " +
Fore.WHITE + f" {message}" )
# An empty line between first line and the result(more clear output)
return
def __str__(self): def __str__(self):
"""Convert Object To String. """Convert Object To String.

@ -144,14 +144,17 @@ def CheckForParameter(username):
if exist it means that sherlock is looking for more multiple username''' if exist it means that sherlock is looking for more multiple username'''
return("{?}" in username) return("{?}" in username)
checksymbols = [] checksymbols = []
checksymbols = [ "_" , "-" , "." ] checksymbols = ["_", "-", "."]
def MultipleUsernames(username): def MultipleUsernames(username):
'''replace the parameter with with symbols and return a list of usernames''' '''replace the parameter with with symbols and return a list of usernames'''
allUsernames = [] allUsernames = []
for i in checksymbols: for i in checksymbols:
allUsernames.append(username.replace("{?}", i)) allUsernames.append(username.replace("{?}", i))
return allUsernames return allUsernames
def sherlock(username, site_data, query_notify, def sherlock(username, site_data, query_notify,
@ -190,7 +193,7 @@ def sherlock(username, site_data, query_notify,
# Notify caller that we are starting the query. # Notify caller that we are starting the query.
query_notify.start(username) query_notify.start(username)
print()
# Create session based on request methodology # Create session based on request methodology
if tor or unique_tor: if tor or unique_tor:
# Requests using Tor obfuscation # Requests using Tor obfuscation
@ -465,9 +468,6 @@ def sherlock(username, site_data, query_notify,
# Add this site's results into final dictionary with all of the other results. # Add this site's results into final dictionary with all of the other results.
results_total[social_network] = results_site results_total[social_network] = results_site
# Notify caller that all queries are finished.
query_notify.finish()
return results_total return results_total
@ -742,7 +742,9 @@ def main():
] ]
) )
print() print()
query_notify.finish()
if __name__ == "__main__": if __name__ == "__main__":
main() main()
# Notify caller that all queries are finished.

Loading…
Cancel
Save