### Install Sherlock via Package Managers Source: https://github.com/sherlock-project/sherlock/blob/master/docs/README.md Common installation methods using pipx, Docker, or dnf. Note that third-party packages for ParrotOS and Ubuntu 24.04 may be broken. ```bash pipx install sherlock-project ``` ```bash docker run -it --rm sherlock/sherlock ``` ```bash dnf install sherlock-project ``` -------------------------------- ### Example Site Entry in data.json Source: https://github.com/sherlock-project/sherlock/wiki/Adding-Sites-To-Sherlock Illustrates a typical entry for a website within the data.json configuration file, specifying parameters for username availability checks. ```json "Some Cool Site That Everyone Loves": { "errorType": "status_code", "regexCheck": "^[a-zA-Z][a-zA-Z0-9_-]*$", "url": "https://somecoolsitethateveryoneloves.com/members/{}", "urlMain": "https://somecoolsitethateveryoneloves.com", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### Create and Access QueryResult Objects Source: https://context7.com/sherlock-project/sherlock/llms.txt Demonstrates how to create QueryResult objects and access their properties. Includes an example of an error result. ```python result = QueryResult( username="john_doe", site_name="GitHub", site_url_user="https://github.com/john_doe", status=QueryStatus.CLAIMED, query_time=0.245, context=None # Error message if status is UNKNOWN ) # Accessing result properties print(f"Username: {result.username}") print(f"Site: {result.site_name}") print(f"URL: {result.site_url_user}") print(f"Status: {result.status}") # QueryStatus.CLAIMED print(f"Query Time: {result.query_time}s") print(f"Context: {result.context}") # String representation includes context for errors error_result = QueryResult( username="john_doe", site_name="SomeSite", site_url_user="https://somesite.com/john_doe", status=QueryStatus.UNKNOWN, query_time=30.0, context="Connection timeout" ) print(str(error_result)) # "Unknown (Connection timeout)" ``` -------------------------------- ### Run Sherlock via Apify REST API Source: https://context7.com/sherlock-project/sherlock/llms.txt Demonstrates how to initiate a Sherlock search using the Apify REST API with a POST request and provides an example of the expected dataset output format. ```bash # Using Apify REST API curl --request POST \ --url "https://api.apify.com/v2/acts/netmilk~sherlock/run" \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_API_TOKEN' \ --data '{ "usernames": ["john_doe", "jane_doe"] }' # Response contains run ID to fetch results # GET https://api.apify.com/v2/datasets/{datasetId}/items # Dataset output format: # [ # { # "username": "john_doe", # "links": ["https://github.com/john_doe", "https://twitter.com/john_doe"] # }, # { # "username": "jane_doe", # "links": ["https://github.com/jane_doe"] # } # ] ``` -------------------------------- ### Sherlock Site Data JSON Schema Source: https://context7.com/sherlock-project/sherlock/llms.txt Illustrates the structure of site configuration within data.json, including examples for GitHub, Twitter, and a custom site. ```json { "$schema": "https://raw.githubusercontent.com/sherlock-project/sherlock/master/sherlock_project/resources/data.schema.json", "GitHub": { "url": "https://github.com/{}", "urlMain": "https://github.com", "urlProbe": "https://api.github.com/users/{}", "username_claimed": "torvalds", "errorType": "status_code", "errorCode": 404, "headers": { "Accept": "application/vnd.github.v3+json" }, "regexCheck": "^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$" }, "Twitter": { "url": "https://twitter.com/{}", "urlMain": "https://twitter.com", "username_claimed": "elonmusk", "errorType": "message", "errorMsg": "This account doesn't exist" }, "CustomSite": { "url": "https://example.com/users/{}", "urlMain": "https://example.com", "username_claimed": "admin", "errorType": ["status_code", "message"], "errorCode": [404, 410], "errorMsg": ["User not found", "Account deleted"], "request_method": "POST", "request_payload": {"username": "{}"}, "isNSFW": false } } ``` -------------------------------- ### Python API: Custom QueryNotify Implementation Source: https://context7.com/sherlock-project/sherlock/llms.txt Create custom notification handlers to process results programmatically. This example shows how to implement a `QueryNotify` subclass to collect and export search results as JSON. ```APIDOC ## Python API: Custom QueryNotify Implementation Create custom notification handlers to process results programmatically. ```python from sherlock_project.notify import QueryNotify from sherlock_project.result import QueryStatus, QueryResult import json class JSONQueryNotify(QueryNotify): """Custom notifier that collects results as JSON.""" def __init__(self): super().__init__() self.results = [] self.current_username = None def start(self, username): """Called when search begins for a username.""" self.current_username = username self.results = [] def update(self, result: QueryResult): """Called for each site result.""" self.result = result if result.status == QueryStatus.CLAIMED: self.results.append({ "site": result.site_name, "url": result.site_url_user, "query_time_ms": round(result.query_time * 1000) if result.query_time else None }) def finish(self, message=None): """Called when search completes.""" pass def to_json(self): """Export results as JSON.""" return json.dumps({ "username": self.current_username, "found_count": len(self.results), "profiles": self.results }, indent=2) # Usage from sherlock_project.sherlock import sherlock from sherlock_project.sites import SitesInformation sites = SitesInformation() site_data = {site.name: site.information for site in sites} notifier = JSONQueryNotify() results = sherlock( username="john_doe", site_data=site_data, query_notify=notifier, timeout=30 ) print(notifier.to_json()) # Output: # { # "username": "john_doe", # "found_count": 15, # "profiles": [ # {"site": "GitHub", "url": "https://github.com/john_doe", "query_time_ms": 245}, # {"site": "Twitter", "url": "https://twitter.com/john_doe", "query_time_ms": 312} # ] # } ``` ``` -------------------------------- ### Display Help Information Source: https://github.com/sherlock-project/sherlock/blob/master/docs/pyproject/README.md Use the --help flag to display all available command-line options and their descriptions. This is useful for understanding the full capabilities of the tool. ```console sherlock --help ``` -------------------------------- ### Configure Network and Proxy Settings with CLI Source: https://context7.com/sherlock-project/sherlock/llms.txt Configure proxy settings (HTTP, SOCKS5, Tor) and timeouts for requests. Can also automatically open found profiles in the default browser. ```bash # Use an HTTP/HTTPS proxy sherlock john_doe --proxy http://127.0.0.1:8080 # Use a SOCKS5 proxy sherlock john_doe --proxy socks5://127.0.0.1:1080 # Route traffic through Tor sherlock john_doe --tor # Use unique Tor circuit for each request (slower but more anonymous) sherlock john_doe --unique-tor # Set custom timeout (default is 60 seconds) sherlock john_doe --timeout 30 # Open found profiles in default browser automatically sherlock john_doe --browse ``` -------------------------------- ### Configure v0.dev site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Status update for v0.dev integration. ```json "v0.dev": { "errorType": "message", "errorMsg": "v0 by Vercel", "url": "https://v0.dev/{}", "urlMain": "https://v0.dev", "username_claimed": "t3dotgg" } ``` -------------------------------- ### G2G Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for G2G, which uses a complex JavaScript setup leading to potential false positives. Handles response URLs and includes regex for username validation. ```json "G2G": { "errorType": "response_url", "errorUrl": "https://www.g2g.com/{}", "regexCheck": "^[A-Za-z][A-Za-z0-9_]{2,11}$", "url": "https://www.g2g.com/{}", "urlMain": "https://www.g2g.com/", "username_claimed": "user" } ``` -------------------------------- ### View Sherlock Help and Options Source: https://github.com/sherlock-project/sherlock/blob/master/docs/README.md Displays the command-line interface help menu, including available flags for output formats, proxy settings, and Tor integration. ```console $ sherlock --help usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT] [--output OUTPUT] [--tor] [--unique-tor] [--csv] [--xlsx] [--site SITE_NAME] [--proxy PROXY_URL] [--json JSON_FILE] [--timeout TIMEOUT] [--print-all] [--print-found] [--no-color] [--browse] [--local] [--nsfw] USERNAMES [USERNAMES ...] Sherlock: Find Usernames Across Social Networks (Version 0.14.3) positional arguments: USERNAMES One or more usernames to check with social networks. Check similar usernames using {?} (replace to '_', '-', '.'). optional arguments: -h, --help show this help message and exit --version Display version information and dependencies. --verbose, -v, -d, --debug Display extra debugging information and metrics. --folderoutput FOLDEROUTPUT, -fo FOLDEROUTPUT 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. --csv Create Comma-Separated Values (CSV) File. --xlsx Create the standard file for the modern Microsoft Excel spreadsheet (xlsx). --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 --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: 60) --print-all Output sites where the username was not found. --print-found Output sites where the username was found. --no-color Don't color terminal output --browse, -b Browse to all results on default browser. --local, -l Force the use of the local data.json file. --nsfw Include checking of NSFW sites from default list. ``` -------------------------------- ### PCPartPicker Site Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for PCPartPicker. As of 17-07-2022, requires login to check user existence. ```json { "PCPartPicker": { "errorType": "status_code", "url": "https://pcpartpicker.com/user/{}", "urlMain": "https://pcpartpicker.com", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" } } ``` -------------------------------- ### CLI: Network and Proxy Configuration Source: https://context7.com/sherlock-project/sherlock/llms.txt Configure proxy settings, Tor routing, timeouts, and browser opening for requests. ```APIDOC ## CLI: Network and Proxy Configuration ### Description Configure proxy settings, timeouts, and browser opening for requests. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters - **--proxy** (string) - Optional - Use an HTTP/HTTPS or SOCKS5 proxy (e.g., `http://127.0.0.1:8080`, `socks5://127.0.0.1:1080`). - **--tor** (boolean) - Optional - Route traffic through Tor. - **--unique-tor** (boolean) - Optional - Use a unique Tor circuit for each request (slower but more anonymous). - **--timeout** (integer) - Optional - Set a custom timeout in seconds (default is 60). - **--browse** (boolean) - Optional - Open found profiles in the default browser automatically. #### Request Body None ### Request Example ```bash # Use an HTTP/HTTPS proxy sherlock john_doe --proxy http://127.0.0.1:8080 # Use a SOCKS5 proxy sherlock john_doe --proxy socks5://127.0.0.1:1080 # Route traffic through Tor sherlock john_doe --tor # Use unique Tor circuit for each request sherlock john_doe --unique-tor # Set custom timeout sherlock john_doe --timeout 30 # Open found profiles in default browser automatically sherlock john_doe --browse ``` ### Response #### Success Response (200) Search results are processed with the specified network and proxy configurations. #### Response Example N/A (Output is console/file based on other flags) ``` -------------------------------- ### Manage Site Information Source: https://context7.com/sherlock-project/sherlock/llms.txt Load and configure site data for username searches using the SitesInformation class. ```python from sherlock_project.sites import SitesInformation import os # Load default site data from GitHub (always up-to-date) sites = SitesInformation() print(f"Loaded {len(sites)} sites") # Load from a local JSON file local_path = "/path/to/custom_data.json" sites_local = SitesInformation(data_file_path=local_path) # Load from a custom URL custom_url = "https://example.com/my_sites.json" sites_custom = SitesInformation(data_file_path=custom_url) # Disable upstream exclusions (sites known to have issues) sites_no_exclusions = SitesInformation( honor_exclusions=False ) # Keep specific sites even if they're in exclusion list sites_keep_some = SitesInformation( honor_exclusions=True, do_not_exclude=["SiteA", "SiteB"] ) # Remove NSFW sites (enabled by default) sites.remove_nsfw_sites() # Keep specific NSFW sites while removing others sites.remove_nsfw_sites(do_not_remove=["AllowedNSFWSite"]) # Get list of all site names site_names = sites.site_name_list() print(f"Sites: {', '.join(site_names[:5])}...") # Iterate over sites for site in sites: print(f"Site: {site.name}") print(f" Home URL: {site.url_home}") print(f" Username URL format: {site.url_username_format}") print(f" NSFW: {site.is_nsfw}") # Convert to dictionary for sherlock() function site_data = {site.name: site.information for site in sites} ``` -------------------------------- ### Configure Shpock site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Status update for Shpock integration. ```json "Shpock": { "errorType": "status_code", "url": "https://www.shpock.com/shop/{}/items", "urlMain": "https://www.shpock.com/", "username_claimed": "user" } ``` -------------------------------- ### Configure BabyRU site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Status update for BabyRU integration. ```json "babyRU": { "errorMsg": [ "\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0438\u0441\u043a\u0430\u043b\u0438, \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430", "\u0414\u043e\u0441\u0442\u0443\u043f \u0441 \u0432\u0430\u0448\u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d" ], "errorType": "message", "url": "https://www.baby.ru/u/{}/", "urlMain": "https://www.baby.ru/", "username_claimed": "blue" } ``` -------------------------------- ### CLI: Output Format Options Source: https://context7.com/sherlock-project/sherlock/llms.txt Configure output formats (TXT, CSV, XLSX) and file locations for search results. ```APIDOC ## CLI: Output Format Options ### Description Configure output formats and file locations for search results. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters - **--output** (string) - Optional - Save results to a specific text file (single username only). - **--folderoutput** (string) - Optional - Save results for multiple users to a specified folder. - **--txt** (boolean) - Optional - Export results in TXT format. - **--csv** (boolean) - Optional - Export results in CSV format. - **--xlsx** (boolean) - Optional - Export results in Excel format. - **--print-all** (boolean) - Optional - Show all sites including those not found (verbose). - **--verbose** (boolean) - Optional - Show response times and detailed output. #### Request Body None ### Request Example ```bash # Save results to a specific text file (single username only) sherlock john_doe --output /path/to/results.txt --txt # Save results for multiple users to a folder sherlock user1 user2 --folderoutput ./results --txt # Export results to CSV format sherlock john_doe --csv # Export results to Excel format sherlock john_doe --xlsx # Show all sites including not found (verbose) sherlock john_doe --print-all --verbose ``` ### Response #### Success Response (200) Results are saved to the specified file or folder in the chosen format (TXT, CSV, XLSX). #### Response Example CSV Output Example: ```csv username,name,url_main,url_user,exists,http_status,response_time_s john_doe,John Doe,https://github.com/john_doe,https://github.com/john_doe,True,200,0.5 ``` Verbose Output Example: ``` [+] GitHub [245ms]: https://github.com/john_doe [-] SomeOtherSite [180ms]: Not Found! ``` ``` -------------------------------- ### Configure Output Formats with CLI Source: https://context7.com/sherlock-project/sherlock/llms.txt Customize the output format and file location for search results. Supports TXT, CSV, and XLSX formats, and saving to specific files or folders. ```bash # Save results to a specific text file (single username only) sherlock john_doe --output /path/to/results.txt --txt # Save results for multiple users to a folder sherlock user1 user2 --folderoutput ./results --txt # Export results to CSV format sherlock john_doe --csv # Creates john_doe.csv with columns: username, name, url_main, url_user, exists, http_status, response_time_s # Export results to Excel format sherlock john_doe --xlsx # Creates john_doe.xlsx with hyperlinked URLs # Show all sites including not found (verbose) sherlock john_doe --print-all --verbose # Output includes response times: # [+] GitHub [245ms]: https://github.com/john_doe # [-] SomeOtherSite [180ms]: Not Found! ``` -------------------------------- ### Run Sherlock via Apify CLI Source: https://context7.com/sherlock-project/sherlock/llms.txt Shows how to execute Sherlock searches using the Apify CLI with piped input or a JSON payload. ```bash # Using Apify CLI apify call netmilk/sherlock --input='{"usernames": ["john_doe", "jane_doe"]}' ``` ```bash # Quick one-liner with piped input echo '{"usernames":["user123"]}' | apify call -so netmilk/sherlock # Output: # [{ # "username": "user123", # "links": [ # "https://github.com/user123", # "https://twitter.com/user123" # ] # }] ``` -------------------------------- ### Pinterest Site Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Pinterest. Removed due to false positives. ```json { "Pinterest": { "errorType": "status_code", "url": "https://www.pinterest.com/{}/", "urlMain": "https://www.pinterest.com/", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis76543" } } ``` -------------------------------- ### Configure Twitch site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Status update for Twitch integration. ```json "Twitch": { "errorType": "message", "errorMsg": "components.availability-tracking.warn-unavailable.component", "url": "https://www.twitch.tv/{}", "urlMain": "https://www.twitch.tv/", "urlProbe": "https://m.twitch.tv/{}", "username_claimed": "jenny" } ``` -------------------------------- ### Configure 8tracks site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Status update for 8tracks integration. ```json "8tracks": { "errorType": "message", "errorMsg": "\"available\":true", "headers": { "Accept-Language": "en-US,en;q=0.5" }, "url": "https://8tracks.com/{}", "urlProbe": "https://8tracks.com/users/check_username?login={}&format=jsonh", "urlMain": "https://8tracks.com/", "username_claimed": "blue" } ``` -------------------------------- ### Penetestit Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for lab.pentestit.ru, which returns a 403 error due to a new site structure. Checks user profiles via URL. ```json "labpentestit": { "errorType": "response_url", "errorUrl": "https://lab.pentestit.ru/{}", "url": "https://lab.pentestit.ru/profile/{}", "urlMain": "https://lab.pentestit.ru/", "username_claimed": "CSV" } ``` -------------------------------- ### Python API: SitesInformation Class Source: https://context7.com/sherlock-project/sherlock/llms.txt Load and manage site configuration data for username searches. This class allows loading site data from default sources, local files, or custom URLs, and provides options to manage exclusions and NSFW sites. ```APIDOC ## Python API: SitesInformation Class Load and manage site configuration data for username searches. ```python from sherlock_project.sites import SitesInformation import os # Load default site data from GitHub (always up-to-date) sites = SitesInformation() print(f"Loaded {len(sites)} sites") # Load from a local JSON file local_path = "/path/to/custom_data.json" sites_local = SitesInformation(data_file_path=local_path) # Load from a custom URL custom_url = "https://example.com/my_sites.json" sites_custom = SitesInformation(data_file_path=custom_url) # Disable upstream exclusions (sites known to have issues) sites_no_exclusions = SitesInformation( honor_exclusions=False ) # Keep specific sites even if they're in exclusion list sites_keep_some = SitesInformation( honor_exclusions=True, do_not_exclude=["SiteA", "SiteB"] ) # Remove NSFW sites (enabled by default) sites.remove_nsfw_sites() # Keep specific NSFW sites while removing others sites.remove_nsfw_sites(do_not_remove=["AllowedNSFWSite"]) # Get list of all site names site_names = sites.site_name_list() print(f"Sites: {', '.join(site_names[:5])}..." # Iterate over sites for site in sites: print(f"Site: {site.name}") print(f" Home URL: {site.url_home}") print(f" Username URL format: {site.url_username_format}") print(f" NSFW: {site.is_nsfw}") # Convert to dictionary for sherlock() function site_data = {site.name: site.information for site in sites} ``` ``` -------------------------------- ### easyen Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for easyen, removed due to false positives with usernames containing periods. ```json "easyen": { "errorMsg": "Пользователь не найден", "errorType": "message", "rank": 11564, "url": "https://easyen.ru/index/8-0-{}", "urlMain": "https://easyen.ru/", "username_claimed": "wd", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### Configure Euw site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Updated to account for error messages appearing in the HTTP response body even during successful searches. ```json "Euw": { "errorMsg": "This summoner is not registered at OP.GG. Please check spelling.", "errorType": "message", "url": "https://euw.op.gg/summoner/userName={}", "urlMain": "https://euw.op.gg/", "username_claimed": "blue" } ``` -------------------------------- ### Filter Sites and Use Local Data with CLI Source: https://context7.com/sherlock-project/sherlock/llms.txt Limit searches to specific sites, include NSFW sites, use local data files, or specify custom site manifests via JSON. Supports testing against GitHub PR manifests. ```bash # Search only on specific sites sherlock john_doe --site GitHub --site Twitter --site Instagram # Include NSFW sites in the search sherlock john_doe --nsfw # Use local data.json instead of fetching from GitHub sherlock john_doe --local # Use a custom site manifest (local file or URL) sherlock john_doe --json /path/to/custom_data.json sherlock john_doe --json https://example.com/custom_data.json # Test against a specific GitHub pull request's manifest sherlock john_doe --json 1234 # This fetches data.json from PR #1234 branch # Ignore upstream exclusions (may return more false positives) sherlock john_doe --ignore-exclusions ``` -------------------------------- ### Configure Fiverr site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Updated to handle CSRF protections. ```json "Fiverr": { "errorMsg": "\"status\":\"success\"", "errorType": "message", "headers": { "Content-Type": "application/json", "Accept-Language": "en-US,en;q=0.9" }, "regexCheck": "^[A-Za-z][A-Za-z\\d_]{5,14}$", "request_method": "POST", "request_payload": { "username": "{}" }, "url": "https://www.fiverr.com/{}", "urlMain": "https://www.fiverr.com/", "urlProbe": "https://www.fiverr.com/validate_username", "username_claimed": "blueman" } ``` -------------------------------- ### MeetMe Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for checking MeetMe usernames. Note: MeetMe may return false positives. ```json "MeetMe": { "errorType": "response_url", "errorUrl": "https://www.meetme.com/", "url": "https://www.meetme.com/{}", "urlMain": "https://www.meetme.com/", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### OK Username Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for OK.ru username checking. Note: As of 2023.04.21, Ok.ru returns false positives. ```json { "OK": { "errorType": "status_code", "regexCheck": "^[a-zA-Z][a-zA-Z0-9_.-]*$", "url": "https://ok.ru/{}", "urlMain": "https://ok.ru/", "username_claimed": "ok" } } ``` -------------------------------- ### CLI: Site Filtering and Selection Source: https://context7.com/sherlock-project/sherlock/llms.txt Limit searches to specific sites, include NSFW sites, use local data, or specify custom site manifests. ```APIDOC ## CLI: Site Filtering and Selection ### Description Limit searches to specific sites or categories, use local data, or specify custom site manifests. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters - **--site** (string) - Optional - Search only on the specified site(s). Can be used multiple times. - **--nsfw** (boolean) - Optional - Include NSFW sites in the search. - **--local** (boolean) - Optional - Use local `data.json` instead of fetching from GitHub. - **--json** (string) - Optional - Use a custom site manifest (local file path or URL). Can also be a GitHub PR number. - **--ignore-exclusions** (boolean) - Optional - Ignore upstream exclusions (may return more false positives). #### Request Body None ### Request Example ```bash # Search only on specific sites sherlock john_doe --site GitHub --site Twitter --site Instagram # Include NSFW sites in the search sherlock john_doe --nsfw # Use local data.json instead of fetching from GitHub sherlock john_doe --local # Use a custom site manifest (local file or URL) sherlock john_doe --json /path/to/custom_data.json sherlock john_doe --json https://example.com/custom_data.json # Use a custom site manifest from a GitHub PR sherlock john_doe --json 1234 # Ignore upstream exclusions sherlock john_doe --ignore-exclusions ``` ### Response #### Success Response (200) Search results filtered according to the specified site criteria. #### Response Example N/A (Output is console/file based on other flags) ``` -------------------------------- ### Implement Custom QueryNotify Source: https://context7.com/sherlock-project/sherlock/llms.txt Create custom notification handlers by extending QueryNotify to process search results programmatically. ```python from sherlock_project.notify import QueryNotify from sherlock_project.result import QueryStatus, QueryResult import json class JSONQueryNotify(QueryNotify): """Custom notifier that collects results as JSON.""" def __init__(self): super().__init__() self.results = [] self.current_username = None def start(self, username): """Called when search begins for a username.""" self.current_username = username self.results = [] def update(self, result: QueryResult): """Called for each site result.""" self.result = result if result.status == QueryStatus.CLAIMED: self.results.append({ "site": result.site_name, "url": result.site_url_user, "query_time_ms": round(result.query_time * 1000) if result.query_time else None }) def finish(self, message=None): """Called when search completes.""" pass def to_json(self): """Export results as JSON.""" return json.dumps({ "username": self.current_username, "found_count": len(self.results), "profiles": self.results }, indent=2) # Usage from sherlock_project.sherlock import sherlock from sherlock_project.sites import SitesInformation sites = SitesInformation() site_data = {site.name: site.information for site in sites} notifier = JSONQueryNotify() results = sherlock( username="john_doe", site_data=site_data, query_notify=notifier, timeout=30 ) print(notifier.to_json()) ``` -------------------------------- ### Run Sherlock via Docker Source: https://context7.com/sherlock-project/sherlock/llms.txt Provides various Docker commands to run Sherlock, including searching single/multiple users, mounting output directories, using Tor, custom proxies, and custom timeouts. ```bash # Pull and run with a single username docker run -it --rm sherlock/sherlock user123 ``` ```bash # Search multiple usernames docker run -it --rm sherlock/sherlock user1 user2 user3 ``` ```bash # Mount output directory to save results docker run -it --rm \ -v "$(pwd)/results:/results" \ sherlock/sherlock user123 \ --folderoutput /results \ --txt --csv ``` ```bash # Use with Tor (requires Tor to be configured in container) docker run -it --rm sherlock/sherlock user123 --tor ``` ```bash # Use custom proxy docker run -it --rm \ sherlock/sherlock user123 \ --proxy socks5://host.docker.internal:1080 ``` ```bash # Use custom timeout and verbose output docker run -it --rm \ sherlock/sherlock user123 \ --timeout 30 --verbose --print-all ``` -------------------------------- ### Ghost Site Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Ghost. As of 17-07-2022, it returns false positives. ```json { "Ghost": { "errorMsg": "Domain Error", "errorType": "message", "url": "https://{}.ghost.io/", "urlMain": "https://ghost.org/", "username_claimed": "troyhunt", "username_unclaimed": "noonewouldeverusethis7" } } ``` -------------------------------- ### Crunchyroll Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for checking Crunchyroll usernames. Note: Crunchyroll may return false positives. ```json "Crunchyroll": { "errorType": "status_code", "url": "https://www.crunchyroll.com/user/{}", "urlMain": "https://www.crunchyroll.com/", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### ingvarr.net.ru Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for ingvarr.net.ru, removed because the website is no longer active. ```json "ingvarr.net.ru": { "errorMsg": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d", "errorType": "message", "rank": 107721, "url": "http://ingvarr.net.ru/index/8-0-{}", "urlMain": "http://ingvarr.net.ru/", "username_claimed": "red", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### Redsun.tf Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Redsun.tf, removed due to dynamic username modification issues. ```json "Redsun.tf": { "errorMsg": "The specified member cannot be found", "errorType": "message", "rank": 3796657, "url": "https://forum.redsun.tf/members/?username={}", "urlMain": "https://redsun.tf/", "username_claimed": "dan", "username_unclaimed": "noonewouldeverusethis" }, ``` -------------------------------- ### Aptoide Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for checking Aptoide usernames. Note: Aptoide may return false positives. ```json "Aptoide": { "errorType": "status_code", "url": "https://{}.en.aptoide.com/", "urlMain": "https://en.aptoide.com/", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### Basic Username Search with CLI Source: https://context7.com/sherlock-project/sherlock/llms.txt Perform a basic search for a single or multiple usernames using the Sherlock CLI. Supports username variations with placeholders. ```bash # Search for a single username sherlock john_doe # Search for multiple usernames sherlock user1 user2 user3 # Search with username variations (replaces {?} with _, -, .) sherlock john{?}doe # This searches for: john_doe, john-doe, john.doe # Expected output: # [*] Checking username john_doe on: # # [+] GitHub: https://github.com/john_doe # [+] Twitter: https://twitter.com/john_doe # [+] Instagram: https://instagram.com/john_doe # [*] Search completed with 3 results # Results are saved to john_doe.txt by default ``` -------------------------------- ### Configure TorrentGalaxy site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Status update for TorrentGalaxy integration. ```json "TorrentGalaxy": { "errorMsg": "TGx:Can't show details", "errorType": "message", "regexCheck": "^[A-Za-z0-9]{3,15}$", "url": "https://torrentgalaxy.to/profile/{}", "urlMain": "https://torrentgalaxy.to/", "username_claimed": "GalaxyRG" } ``` -------------------------------- ### Quizlet Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Quizlet, requiring JavaScript to check for user existence. Handles 'Page Unavailable' errors. ```json "Quizlet": { "errorMsg": "Page Unavailable", "errorType": "message", "url": "https://quizlet.com/{}", "urlMain": "https://quizlet.com", "username_claimed": "blue" } ``` -------------------------------- ### Configure Etsy site definition Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Updated due to 403 Forbidden responses and connection verification requirements. ```json "Etsy": { "errorType": "status_code", "url": "https://www.etsy.com/shop/{}", "urlMain": "https://www.etsy.com/", "username_claimed": "JennyKrafts" } ``` -------------------------------- ### KanoWorld Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for KanoWorld, removed because the API subdomain no longer exists. ```json "KanoWorld": { "errorType": "status_code", "rank": 181933, "url": "https://api.kano.me/progress/user/{}", "urlMain": "https://world.kano.me/", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### pvpru Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for pvpru, removed due to CloudFlair access denial. ```json "pvpru": { "errorType": "status_code", "rank": 405547, "url": "https://pvpru.com/board/member.php?username={}&tab=aboutme#aboutme", "urlMain": "https://pvpru.com/", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" } ``` -------------------------------- ### Smashcast Site Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Smashcast. As of 2022-05-01, the site is down. ```json { "Smashcast": { "errorType": "status_code", "url": "https://www.smashcast.tv/api/media/live/{}", "urlMain": "https://www.smashcast.tv/", "username_claimed": "hello", "username_unclaimed": "noonewouldeverusethis7" } } ``` -------------------------------- ### TikTok Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for TikTok, which returns false positives due to blank pages. Proxitok is also ineffective. ```json "TikTok": { "errorType": "status_code", "url": "https://tiktok.com/@{}", "urlMain": "https://tiktok.com/", "username_claimed": "red" } ``` -------------------------------- ### Zomato Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Zomato, removed due to service instability and slow response times. ```json "Zomato": { "errorType": "status_code", "headers": { "Accept-Language": "en-US,en;q=0.9" }, "rank": 1920, "url": "https://www.zomato.com/pl/{}/foodjourney", "urlMain": "https://www.zomato.com/", "username_claimed": "deepigoyal", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### Bitcoin Forum Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Bitcoin Forum, which appears defunct. Handles 'user does not exist' errors. ```json "BitCoinForum": { "errorMsg": "The user whose profile you are trying to view does not exist.", "errorType": "message", "url": "https://bitcoinforum.com/profile/{}", "urlMain": "https://bitcoinforum.com", "username_claimed": "bitcoinforum.com" } ``` -------------------------------- ### Work with QueryResult and QueryStatus Source: https://context7.com/sherlock-project/sherlock/llms.txt Access status enumeration values to interpret search results. ```python from sherlock_project.result import QueryResult, QueryStatus # QueryStatus enumeration values print(QueryStatus.CLAIMED.value) # "Claimed" - Username found on site print(QueryStatus.AVAILABLE.value) # "Available" - Username not found print(QueryStatus.UNKNOWN.value) # "Unknown" - Error occurred print(QueryStatus.ILLEGAL.value) # "Illegal" - Username format not allowed print(QueryStatus.WAF.value) # "WAF" - Blocked by Web Application Firewall ``` -------------------------------- ### SegmentFault Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for checking SegmentFault usernames. Note: SegmentFault may return false positives. ```json "SegmentFault": { "errorType": "status_code", "url": "https://segmentfault.com/u/{}", "urlMain": "https://segmentfault.com/", "username_claimed": "bule", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### elwoRU Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for elwoRU, removed because the website is no longer active. ```json "elwoRU": { "errorMsg": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d", "errorType": "message", "rank": 254810, "url": "https://elwo.ru/index/8-0-{}", "urlMain": "https://elwo.ru/", "username_claimed": "red", "username_unclaimed": "noonewouldeverusethis7" }, ``` -------------------------------- ### Viadeo Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for checking Viadeo usernames. Note: Viadeo may return false positives. ```json "Viadeo": { "errorType": "status_code", "url": "http://fr.viadeo.com/en/profile/{}", "urlMain": "http://fr.viadeo.com/en/", "username_claimed": "franck.patissier", "username_unclaimed": "noonewouldeverusethis" }, ``` -------------------------------- ### Countable Site Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for Countable. As of 2022-05-01, it returns false positives. ```json { "Countable": { "errorType": "status_code", "url": "https://www.countable.us/{}", "urlMain": "https://www.countable.us/", "username_claimed": "blue", "username_unclaimed": "noonewouldeverusethis7" } } ``` -------------------------------- ### Ebio.gg Username Check Configuration Source: https://github.com/sherlock-project/sherlock/blob/master/docs/removed-sites.md Configuration for ebio.gg, which returns false positives. Checks user profiles via URL. ```json "ebio.gg": { "errorType": "status_code", "url": "https://ebio.gg/{}", "urlMain": "https:/ebio.gg", "username_claimed": "dev" } ``` -------------------------------- ### Run Sherlock Actor via CLI Source: https://github.com/sherlock-project/sherlock/blob/master/docs/README.md Execute the Sherlock Actor using the Apify CLI by piping JSON input. The output is a JSON array of results. ```bash $ echo '{"usernames":["user123"]}' | apify call -so netmilk/sherlock [{ "username": "user123", "links": [ "https://www.1337x.to/user/user123/", ... ] }] ```