ADVANCED MODULE — Sherlock + OSINT Pro¶
We’ll cover:
- Adding custom websites to Sherlock
- Understanding the code internally
- Automating reports
- Integrating Sherlock with other OSINT tools
- Advanced investigation workflow
1Add Your Own Websites to Sherlock¶
Sherlock can be extended by editing its data.json file.
Steps:¶
- Open
sherlock/resources/data.json - Add a new site in JSON format:
{username}→ replaced automaticallyerrorType:status_codeormessage-
errorMsg: what indicates the username does not exist -
Save file, then run:
Your new site is now included.
This allows any niche platform to be added, like small forums, gaming sites, or business directories.
Understand Sherlock Internally (Python Basics)¶
Sherlock is written in Python 3. Core parts:
sherlock/sherlock.py→ main program, parses args, callssearch.pysherlock/search.py→ handles searching on all sitessherlock/resources/data.json→ database of platformsrequestslibrary → handles HTTP requestsargparse→ handles command-line arguments
Flow:
Input username → Read JSON → For each site:
→ Construct URL
→ Send request
→ Check status / error message
→ Save result → Output
You can modify or add logic, e.g.,:
- Retry on error
- Delay between requests (anti-block)
- Custom output formatting
Automate OSINT Reports¶
Instead of manually checking every search:
- Run Sherlock → JSON output
- Use a Python script to generate a clean report:
import json
with open("report.json") as f:
data = json.load(f)
for site, info in data.items():
if info['status'] == "Found":
print(f"{site}: {info['url']}")
-
Extend script:
-
Convert JSON → HTML
- Convert JSON → PDF
- Highlight “most important accounts”
Automation saves hours in large investigations.
Combine Sherlock With Other OSINT Tools¶
Advanced investigators never rely on one tool:
- SpiderFoot → scans domains, emails, usernames, IPs → visualizes relationships
- Maltego → builds graphs of linked accounts, emails, domains, and IPs
- Holehe → check which emails are linked to social accounts
- WhatsMyName → alternate username database
Example workflow:
- Run Sherlock → find usernames
- Holehe → check emails linked to usernames
- Maltego → create a visual graph of all accounts
- SpiderFoot → automate large-scale OSINT
- Save report → PDF/HTML
Advanced Investigation Workflow¶
-
Target Identification
-
Collect all known usernames, emails, aliases
-
Sherlock Search
-
Run usernames across all platforms
-
Save JSON output
-
Account Verification
-
Check profile picture, bio, activity
-
Compare timezones and patterns
-
Cross-Platform Correlation
-
Identify same person using multiple accounts
-
Identify fake/impersonated accounts
-
Visualize & Analyze
-
Use Maltego or SpiderFoot to map connections
-
Detect relationships between accounts
-
Report & Monitor
-
Generate automated report
- Monitor new accounts periodically (weekly/monthly)
Advanced Practical Exercise (Do Now)¶
- Pick 2–3 usernames (yours or test accounts)
- Add 1 new niche website to Sherlock (
data.json) - Run Sherlock with
--json --tor -
Write a Python script to generate a clean report with:
-
Platforms found
- Links
- Manual confirmation notes