Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 

Repository files navigation

LinkLens πŸ”

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.

Why LinkLens

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.

What It Does

  • 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

Demo

πŸ” 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 ⚠️ Registrar : Namecheap Country : Russia 🚩 Blacklisted : Yes ❌

πŸ”Ž 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

Tech Stack

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

Project Structure

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

Installation

git clone https://github.com/padhisneha2025-dev/linklens.git
cd linklens
python -m venv venv
venv\Scripts\activate  # Windows
pip install -r requirements.txt

Create a .env file:

ANTHROPIC_API_KEY=your_key_here

Run it:

python main.py analyze "https://suspicious-link.com"

What I Learned Building This

  • 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

Part of the ShadowLens Universe

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

License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors