Skip to content

Commit 271608f

Browse files
authored
Merge pull request sherlock-project#2898 from sherlock-project/improvements
Make Minor Improvements
2 parents a192cb4 + eb79980 commit 271608f

4 files changed

Lines changed: 18 additions & 50 deletions

File tree

docs/README.md

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
Community-maintained packages are available for Debian (>= 13), Ubuntu (>= 22.10), Homebrew, Kali, and BlackArch. These packages are not directly supported or maintained by the Sherlock Project.
3535

36-
See all alternative installation methods [here](https://sherlockproject.xyz/installation)
36+
See all alternative installation methods [here](https://sherlockproject.xyz/installation).
3737

3838
## General usage
3939

@@ -51,51 +51,41 @@ Accounts found will be stored in an individual text file with the corresponding
5151

5252
```console
5353
$ sherlock --help
54-
usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT]
55-
[--output OUTPUT] [--tor] [--unique-tor] [--csv] [--xlsx]
56-
[--site SITE_NAME] [--proxy PROXY_URL] [--json JSON_FILE]
57-
[--timeout TIMEOUT] [--print-all] [--print-found] [--no-color]
58-
[--browse] [--local] [--nsfw]
54+
usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT] [--output OUTPUT] [--csv] [--xlsx] [--site SITE_NAME] [--proxy PROXY_URL] [--dump-response]
55+
[--json JSON_FILE] [--timeout TIMEOUT] [--print-all] [--print-found] [--no-color] [--browse] [--local] [--nsfw] [--txt] [--ignore-exclusions]
5956
USERNAMES [USERNAMES ...]
6057

61-
Sherlock: Find Usernames Across Social Networks (Version 0.14.3)
58+
Sherlock: Find Usernames Across Social Networks (Version 0.16.0)
6259

6360
positional arguments:
64-
USERNAMES One or more usernames to check with social networks.
65-
Check similar usernames using {?} (replace to '_', '-', '.').
61+
USERNAMES One or more usernames to check with social networks. Check similar usernames using {?} (replace to '_', '-', '.').
6662

67-
optional arguments:
63+
options:
6864
-h, --help show this help message and exit
6965
--version Display version information and dependencies.
7066
--verbose, -v, -d, --debug
7167
Display extra debugging information and metrics.
7268
--folderoutput FOLDEROUTPUT, -fo FOLDEROUTPUT
73-
If using multiple usernames, the output of the results will be
74-
saved to this folder.
69+
If using multiple usernames, the output of the results will be saved to this folder.
7570
--output OUTPUT, -o OUTPUT
76-
If using single username, the output of the result will be saved
77-
to this file.
78-
--tor, -t Make requests over Tor; increases runtime; requires Tor to be
79-
installed and in system path.
80-
--unique-tor, -u Make requests over Tor with new Tor circuit after each request;
81-
increases runtime; requires Tor to be installed and in system
82-
path.
71+
If using single username, the output of the result will be saved to this file.
8372
--csv Create Comma-Separated Values (CSV) File.
84-
--xlsx Create the standard file for the modern Microsoft Excel
85-
spreadsheet (xlsx).
86-
--site SITE_NAME Limit analysis to just the listed sites. Add multiple options to
87-
specify more than one site.
73+
--xlsx Create the standard file for the modern Microsoft Excel spreadsheet (xlsx).
74+
--site SITE_NAME Limit analysis to just the listed sites. Add multiple options to specify more than one site.
8875
--proxy PROXY_URL, -p PROXY_URL
8976
Make requests over a proxy. e.g. socks5://127.0.0.1:1080
77+
--dump-response Dump the HTTP response to stdout for targeted debugging.
9078
--json JSON_FILE, -j JSON_FILE
91-
Load data from a JSON file or an online, valid, JSON file.
79+
Load data from a JSON file or an online, valid, JSON file. Upstream PR numbers also accepted.
9280
--timeout TIMEOUT Time (in seconds) to wait for response to requests (Default: 60)
9381
--print-all Output sites where the username was not found.
94-
--print-found Output sites where the username was found.
82+
--print-found Output sites where the username was found (also if exported as file).
9583
--no-color Don't color terminal output
9684
--browse, -b Browse to all results on default browser.
9785
--local, -l Force the use of the local data.json file.
9886
--nsfw Include checking of NSFW sites from default list.
87+
--txt Enable creation of a txt file
88+
--ignore-exclusions Ignore upstream exclusions (may return more false positives)
9989
```
10090

10191
## Credits

sherlock_project/notify.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def __init__(self, result=None):
3737

3838
self.result = result
3939

40-
# return
4140

4241
def start(self, message=None):
4342
"""Notify Start.
@@ -56,7 +55,6 @@ def start(self, message=None):
5655
Nothing.
5756
"""
5857

59-
# return
6058

6159
def update(self, result):
6260
"""Notify Update.
@@ -75,7 +73,6 @@ def update(self, result):
7573

7674
self.result = result
7775

78-
# return
7976

8077
def finish(self, message=None):
8178
"""Notify Finish.
@@ -94,7 +91,6 @@ def finish(self, message=None):
9491
Nothing.
9592
"""
9693

97-
# return
9894

9995
def __str__(self):
10096
"""Convert Object To String.
@@ -137,7 +133,6 @@ def __init__(self, result=None, verbose=False, print_all=False, browse=False):
137133
self.print_all = print_all
138134
self.browse = browse
139135

140-
return
141136

142137
def start(self, message):
143138
"""Notify Start.
@@ -163,7 +158,6 @@ def start(self, message):
163158
# An empty line between first line and the result(more clear output)
164159
print('\r')
165160

166-
return
167161

168162
def countResults(self):
169163
"""This function counts the number of results. Every time the function is called,
@@ -238,7 +232,7 @@ def update(self, result):
238232
Fore.WHITE + "]" +
239233
Fore.GREEN + f" {self.result.site_name}:" +
240234
Fore.YELLOW + f" {msg}")
241-
235+
242236
elif result.status == QueryStatus.WAF:
243237
if self.print_all:
244238
print(Style.BRIGHT + Fore.WHITE + "[" +
@@ -254,10 +248,9 @@ def update(self, result):
254248
f"Unknown Query Status '{result.status}' for site '{self.result.site_name}'"
255249
)
256250

257-
return
258251

259252
def finish(self, message="The processing has been finished."):
260-
"""Notify Start.
253+
"""Notify Finish.
261254
Will print the last line to the standard output.
262255
Keyword Arguments:
263256
self -- This object.

sherlock_project/sherlock.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -675,16 +675,6 @@ def main():
675675
help="Include checking of NSFW sites from default list.",
676676
)
677677

678-
# TODO deprecated in favor of --txt, retained for workflow compatibility, to be removed
679-
# in future release
680-
parser.add_argument(
681-
"--no-txt",
682-
action="store_true",
683-
dest="no_txt",
684-
default=False,
685-
help="Disable creation of a txt file - WILL BE DEPRECATED",
686-
)
687-
688678
parser.add_argument(
689679
"--txt",
690680
action="store_true",

sherlock_project/sites.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import secrets
99

1010

11-
MANIFEST_URL = "https://raw.githubusercontent.com/sherlock-project/sherlock/master/sherlock_project/resources/data.json"
11+
MANIFEST_URL = "https://data.sherlockproject.xyz"
1212
EXCLUSIONS_URL = "https://raw.githubusercontent.com/sherlock-project/sherlock/refs/heads/exclusions/false_positive_exclusions.txt"
1313

1414
class SiteInformation:
@@ -121,11 +121,6 @@ def __init__(
121121
# users from creating issue about false positives which has already been fixed or having outdated data
122122
data_file_path = MANIFEST_URL
123123

124-
# Ensure that specified data file has correct extension.
125-
if not data_file_path.lower().endswith(".json"):
126-
raise FileNotFoundError(f"Incorrect JSON file extension for data file '{data_file_path}'.")
127-
128-
# if "http://" == data_file_path[:7].lower() or "https://" == data_file_path[:8].lower():
129124
if data_file_path.lower().startswith("http"):
130125
# Reference is to a URL.
131126
try:

0 commit comments

Comments
 (0)