removed option to present websites ordered by their Alexa.com global rank in popularity

refer to #610 for reason of removal
pull/704/head
Siddharth Dushantha 4 years ago
parent 73989aaf5f
commit cc8192f45c

@ -56,14 +56,12 @@ $ python3 -m pip install -r requirements.txt
```bash
$ python3 sherlock --help
usage: sherlock [-h] [--version] [--verbose] [--rank]
[--folderoutput FOLDEROUTPUT] [--output OUTPUT] [--tor]
[--unique-tor] [--csv] [--site SITE_NAME] [--proxy PROXY_URL]
[--json JSON_FILE] [--timeout TIMEOUT] [--print-found]
[--no-color] [--browse]
usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT] [--output OUTPUT]
[--tor] [--unique-tor] [--csv] [--site SITE_NAME] [--proxy PROXY_URL]
[--json JSON_FILE] [--timeout TIMEOUT] [--print-found] [--no-color] [--browse]
USERNAMES [USERNAMES ...]
Sherlock: Find Usernames Across Social Networks (Version 0.12.2)
Sherlock: Find Usernames Across Social Networks (Version 0.12.3)
positional arguments:
USERNAMES One or more usernames to check with social networks.
@ -73,33 +71,26 @@ optional arguments:
--version Display version information and dependencies.
--verbose, -v, -d, --debug
Display extra debugging information and metrics.
--rank, -r Present websites ordered by their Alexa.com global
rank in popularity.
--folderoutput FOLDEROUTPUT, -fo FOLDEROUTPUT
If using multiple usernames, the output of the results
will be saved to this folder.
If using multiple usernames, the output of the results will be saved to
this folder.
--output OUTPUT, -o OUTPUT
If using single username, the output of the result
will be saved to this file.
--tor, -t Make requests over Tor; increases runtime; requires
Tor to be installed and in system path.
--unique-tor, -u Make requests over Tor with new Tor circuit after each
request; increases runtime; requires Tor to be
installed and in system path.
If using single username, the output of the result will be saved to this
file.
--tor, -t Make requests over Tor; increases runtime; requires Tor to be installed and
in system path.
--unique-tor, -u Make requests over Tor with new Tor circuit after each request; increases
runtime; requires Tor to be installed and in system path.
--csv Create Comma-Separated Values (CSV) File.
--site SITE_NAME Limit analysis to just the listed sites. Add multiple
options to specify more than one site.
--site SITE_NAME Limit analysis to just the listed sites. Add multiple options to specify
more than one site.
--proxy PROXY_URL, -p PROXY_URL
Make requests over a proxy. e.g.
socks5://127.0.0.1:1080
Make requests over a proxy. e.g. socks5://127.0.0.1:1080
--json JSON_FILE, -j JSON_FILE
Load data from a JSON file or an online, valid, JSON
file.
--timeout TIMEOUT Time (in seconds) to wait for response to requests.
Default timeout of 60.0s.A longer timeout will be more
likely to get results from slow sites.On the other
hand, this may cause a long delay to gather all
results.
Load data from a JSON file or an online, valid, JSON file.
--timeout TIMEOUT Time (in seconds) to wait for response to requests. Default timeout of
60.0s.A longer timeout will be more likely to get results from slow
sites.On the other hand, this may cause a long delay to gather all results.
--print-found Do not output sites where the username was not found.
--no-color Don't color terminal output
--browse, -b Browse to all results on default browser.

@ -438,9 +438,6 @@ def main():
action="store_true", dest="verbose", default=False,
help="Display extra debugging information and metrics."
)
parser.add_argument("--rank", "-r",
action="store_true", dest="rank", default=False,
help="Present websites ordered by their Alexa.com global rank in popularity.")
parser.add_argument("--folderoutput", "-fo", dest="folderoutput",
help="If using multiple usernames, the output of the results will be saved to this folder."
)
@ -557,15 +554,6 @@ def main():
f"Error: Desired sites not found: {', '.join(site_missing)}.")
sys.exit(1)
if args.rank:
# Sort data by rank
site_dataCpy = dict(site_data)
ranked_sites = sorted(site_data, key=lambda k: ("rank" not in k, site_data[k].get("rank", sys.maxsize)))
site_data = {}
for site in ranked_sites:
site_data[site] = site_dataCpy.get(site)
#Create notify object for query results.
query_notify = QueryNotifyPrint(result=None,
verbose=args.verbose,

@ -11,9 +11,8 @@ import sys
class SiteInformation():
def __init__(self, name, url_home, url_username_format, popularity_rank,
username_claimed, username_unclaimed,
information):
def __init__(self, name, url_home, url_username_format, username_claimed,
username_unclaimed, information):
"""Create Site Information Object.
Contains information about a specific web site.
@ -32,10 +31,6 @@ class SiteInformation():
usernames would show up under the
"https://somesite.com/users/" area of
the web site.
popularity_rank -- Integer indicating popularity of site.
In general, smaller numbers mean more
popular ("0" or None means ranking
information not available).
username_claimed -- String containing username which is known
to be claimed on web site.
username_unclaimed -- String containing username which is known
@ -58,11 +53,6 @@ class SiteInformation():
self.url_home = url_home
self.url_username_format = url_username_format
if (popularity_rank is None) or (popularity_rank == 0):
#We do not know the popularity, so make site go to bottom of list.
popularity_rank = sys.maxsize
self.popularity_rank = popularity_rank
self.username_claimed = username_claimed
self.username_unclaimed = username_unclaimed
self.information = information
@ -169,14 +159,11 @@ class SitesInformation():
#Add all of site information from the json file to internal site list.
for site_name in site_data:
try:
#If popularity unknown, make site be at bottom of list.
popularity_rank = site_data[site_name].get("rank", sys.maxsize)
self.sites[site_name] = \
SiteInformation(site_name,
site_data[site_name]["urlMain"],
site_data[site_name]["url"],
popularity_rank,
site_data[site_name]["username_claimed"],
site_data[site_name]["username_unclaimed"],
site_data[site_name]
@ -189,32 +176,17 @@ class SitesInformation():
return
def site_name_list(self, popularity_rank=False):
def site_name_list(self):
"""Get Site Name List.
Keyword Arguments:
self -- This object.
popularity_rank -- Boolean indicating if list should be sorted
by popularity rank.
Default value is False.
NOTE: List is sorted in ascending
alphabetical order is popularity rank
is not requested.
Return Value:
List of strings containing names of sites.
"""
if popularity_rank:
#Sort in ascending popularity rank order.
site_rank_name = \
sorted([(site.popularity_rank,site.name) for site in self],
key=operator.itemgetter(0)
)
site_names = [name for _,name in site_rank_name]
else:
#Sort in ascending alphabetical order.
site_names = sorted([site.name for site in self], key=str.lower)
site_names = sorted([site.name for site in self], key=str.lower)
return site_names

Loading…
Cancel
Save