Author: Spiderssh
Tool: Webspy – Hybrid Endpoint Analyzer for Web Recon
Webspy is a comprehensive Python tool designed to extract backend endpoints from HTML/JS files or live websites. It combines static analysis with optional asynchronous crawling to uncover REST, GraphQL, WebSockets, redirects, and generic endpoints. It also supports recursive decoding of Base64 and URL-encoded endpoints and can optionally deliver results to Telegram.
Key Features:
- Analyze local files (HTML, JS) or directories
- Optional crawling of live websites with
--depth - Inline JS and external JS detection
- Recursive Base64 & URL decoding
- Endpoint categorization: REST, GraphQL, WebSocket, redirects, generic
- JSON and TXT output
- Optional Telegram delivery via
.env - Automatic ffuf and nuclei command generation
- Clone or download the repository.
- Ensure Python 3.10+ is installed.
- Install all dependencies in one command:
git clone https://github.com/Spiderssh/Webspy.git
cd WebspyCheck your Python version:
python3 --versionpip install aiohttp beautifulsoup4 python-dotenv requestsaiohttp – Asynchronous HTTP requests for crawling and fetching
beautifulsoup4 – HTML parsing for extracting JS and links
python-dotenv – Read .env configuration (optional, for Telegram)
requests – Send outputs to Telegram (optional)
Analyze Local Files or Directories
python3 webspy.py /path/to/files -o endpointsCrawl a Website Before Analysis
python3 webspy.py https://example.com --depth 2 -o endpointsSend Results to Telegram
- Create a .env file with your bot credentials:
TELEGRAM_BOT_TOKEN=123456:ABCDEF...
TELEGRAM_CHAT_ID=123456789- Run with --send:
python3 webspy.py /path/to/files --send --env .envArgument Description
inputs Files, directories, or a single URL to crawl --base-url Base URL for normalization of absolute URLs -o, --output Output base name (JSON and TXT will use this) --depth Max crawl depth (default: 1) --send Send outputs to Telegram --env Path to .env file for Telegram credentials
JSON Example:
{
"endpoints": {
"rest": ["/api/v1/users", "/v2/login"],
"graphql": ["/graphql"],
"websocket": ["/ws/updates"],
"redirects": ["/return_url"],
"generic": ["/about", "/contact"]
},
"all": ["/api/v1/users", "/v2/login", "/graphql", "/ws/updates", "/return_url", "/about", "/contact"],
"references": {
"external_js": ["https://cdn.example.com/lib.js"],
"external_urls": ["https://other.example.com"]
}
}TXT Example:
/api/v1/users
/v2/login
/graphql
/ws/updates
/return_url
/about
/contactCrawled pages are saved in ./crawled by default.
Only HTML and JS files are analyzed.
Use --depth to control recursion depth for crawling.
Base64 decoding is broad and may detect false positives.
Absolute URLs from other hosts are ignored in normalization.
Requires .env file with:
TELEGRAM_BOT_TOKEN=123456:ABCDEF...
TELEGRAM_CHAT_ID=123456789Sends JSON and TXT results to the specified Telegram chat/bot.
Dependencies: python-dotenv and requests
Analyze local files:
python3 webspy.py ./site_files -o endpointsCrawl a website:
python3 webspy.py https://example.com --depth 2 -o endpointsSend to Telegram:
python3 webspy.py ./site_files --send --env .envGenerate ffuf/nuclei commands automatically:
ffuf -u https://TARGET/FUZZ -w endpoints.txt -t 50
nuclei -l endpoints.txt -t ~/nuclei-templates/Webspy is intended for legal red team, penetration testing, and OSINT purposes only. Unauthorized use on live systems may be illegal. Use responsibly.
Author: Spiderssh Tool: Webspy