A command-line tool that performs deep forensic analysis on suspicious URLs β exposing redirects, domain intelligence, hidden parameters, and AI-powered risk assessment before you click.
Most people click links blindly. Even security-conscious users can't see what's hiding behind a shortened URL, a cloaked redirect, or a freshly registered domain designed to look legitimate. LinkLens gives you x-ray vision into any link before it can do damage.
Built as part of the ShadowLens AI ecosystem a suite of tools for cybersecurity awareness and threat detection.
- Follows and exposes the full redirect chain of any URL
- Parses and surfaces hidden query parameters
- Performs WHOIS lookup β domain age, registrar, country of origin
- Checks against known malicious domain blacklists
- Generates an AI-powered risk verdict using Claude API
- Saves all reports locally as JSON for your personal threat library
π LinkLens β Forensic URL Report ββββββββββββββββββββββββββββββββ
π Original URL : https://bit.ly/3xK9mPz β‘οΈ Redirects to : https://fake-bank-login.ru/hdfc/verify
π Domain Intelligence
Registered : 3 days ago
π Hidden Parameters ?ref=phishing_campaign&track=email_blast
π€ AI Verdict : HIGH RISK This URL uses a shortener to obscure a newly registered foreign domain with embedded tracking parameters consistent with phishing campaigns.
πΎ Report saved β reports/20260404_143021.json
| Layer | Technology |
|---|---|
| Language | Python 3.11+ |
| HTTP & Redirects | requests |
| URL Parsing | urllib |
| Domain Intelligence | WHOIS API |
| AI Risk Assessment | Anthropic Claude API |
| CLI Interface | argparse |
| Persistence | JSON |
linklens/
βββ main.py # CLI entry point
βββ analyzer/
β βββ redirects.py # Redirect chain follower
β βββ domain.py # WHOIS + blacklist lookup
β βββ parser.py # URL parameter extraction
β βββ ai_verdict.py # Claude API risk assessment
βββ reports/ # Saved JSON reports
βββ .env # API keys (never commit)
βββ requirements.txt
βββ README.md
git clone https://github.com/padhisneha2025-dev/linklens.git
cd linklens
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txtCreate a .env file:
ANTHROPIC_API_KEY=your_key_here
Run it:
python main.py analyze "https://suspicious-link.com"- Following HTTP redirect chains with
requests - Parsing and dissecting URL structure with
urllib - Working with WHOIS domain intelligence APIs
- Prompt engineering for structured AI risk assessment
- Designing modular CLI tools in Python
LinkLens is a standalone tool that feeds into the larger ShadowLens AI platform β an AI-powered cybersecurity awareness suite built for Indian internet users.
β ShadowLens AI