API Scanner Pro is a professional desktop application for scanning websites, detecting API endpoints, analyzing security threats, and exporting comprehensive reports. Built with Python, it combines network interception via Playwright with heuristic-based threat analysis and a modern Tkinter GUI.
API Scanner Pro เคเค professional desktop application เคนเฅ เคเฅ websites เคเฅ scan เคเคฐเคคเคพ เคนเฅ, API endpoints detect เคเคฐเคคเคพ เคนเฅ, security threats analyze เคเคฐเคคเคพ เคนเฅ, เคเคฐ comprehensive reports export เคเคฐเคคเคพ เคนเฅเฅค Python เคฎเฅเค built, เคฏเคน Playwright เคเฅ เคฎเคพเคงเฅเคฏเคฎ เคธเฅ network interception เคเฅ heuristic-based threat analysis เคเคฐ modern Tkinter GUI เคเฅ เคธเคพเคฅ combine เคเคฐเคคเคพ เคนเฅเฅค
- Full browser-based network interception using Playwright
- Automatic API endpoint detection from captured traffic
- Cookie, localStorage, and sessionStorage extraction
- HTML metadata and Open Graph tag parsing
- Configurable scan timeouts and retries
- Heuristic-based URL threat detection (phishing, typosquatting, suspicious TLDs)
- HTML content analysis (hidden iframes, obfuscated JS, suspicious forms)
- Shodan integration for host intelligence (open ports, CVEs, services)
- Risk scoring with severity levels: safe, low, medium, high, critical
- JSON export with full metadata and scanner version info
- CSV export with separate files for requests, endpoints, and responses
- HTML report with professional styling, card-based layout, and responsive design
- Batch export via ExportManager for all formats at once
- Modern Tkinter-based GUI with tabbed interface
- Async scanning with real-time progress feedback
- Dedicated tabs: Scanner, Security, Results, Reports
- Custom widgets: StatusBar, URLInput, LogConsole, RiskBadge
Api_Scanner_Bot/
โโโ api_scanner/ # Main package
โ โโโ __init__.py # Package init, version = "2.0.0"
โ โโโ config.py # AppConfig dataclass (env-based settings)
โ โโโ exceptions.py # Custom exception hierarchy
โ โโโ logger.py # Logging setup (file + console)
โ โโโ utils.py # URL validation, rate limiter, retry, serialization
โ โโโ main.py # Application entry point
โ โโโ scanner/ # Core scanning engine
โ โ โโโ models.py # RequestData, ResponseData, ScanResult, etc.
โ โ โโโ network_scanner.py # Playwright-based network interception
โ โ โโโ storage_analyzer.py # Cookie/storage extraction
โ โ โโโ meta_analyzer.py # HTML metadata parsing
โ โโโ security/ # Security analysis module
โ โ โโโ models.py # ThreatReport, SecurityFinding, etc.
โ โ โโโ threat_analyzer.py # Heuristic URL/HTML threat detection
โ โ โโโ shodan_scanner.py # Shodan API integration
โ โโโ exporters/ # Report export system
โ โ โโโ base.py # BaseExporter abstract class
โ โ โโโ json_exporter.py # JSON report generation
โ โ โโโ csv_exporter.py # CSV report generation (pandas)
โ โ โโโ html_exporter.py # Standalone HTML report generation
โ โ โโโ export_manager.py # Multi-format export coordinator
โ โโโ ui/ # Tkinter GUI
โ โโโ app.py # Main ScannerApp window
โ โโโ async_handler.py # Daemon thread + event loop for async ops
โ โโโ widgets.py # Custom reusable widgets
โ โโโ scanner_tab.py # URL scan tab
โ โโโ security_tab.py # Security analysis tab
โ โโโ results_tab.py # Results display tab
โ โโโ reports_tab.py # Export/reports tab
โโโ tests/ # Test suite
โ โโโ conftest.py # Shared fixtures
โ โโโ test_config.py # Config loading tests
โ โโโ test_utils.py # Utility function tests
โ โโโ test_models.py # Data model tests
โ โโโ test_threat_analyzer.py # Threat detection tests
โ โโโ test_exporters.py # Export system tests
โโโ logs/ # Application logs
โโโ .env # Environment configuration (gitignored)
โโโ .env.example # Example configuration template
โโโ requirements.txt # Python dependencies
โโโ pyproject.toml # Project metadata
โโโ README.md # This file
- Python 3.11 or higher
- pip package manager
# 1. Clone the repository
git clone https://github.com/your-username/Api_Scanner_Bot.git
cd Api_Scanner_Bot
# 2. Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Install Playwright browser (required for scanning)
playwright install chromium
# 5. Configure environment
cp .env.example .env
# Edit .env with your settings (e.g., add your Shodan API key)
# 6. Launch the application
python3 -m api_scanner.mainAll configuration is managed through environment variables. Create a .env file (see .env.example):
| Variable | Default | Description |
|---|---|---|
SHODAN_API_KEY |
"" |
Shodan API key for host security scanning |
SCAN_TIMEOUT |
30 |
Maximum seconds to wait for a page scan |
MAX_RETRIES |
3 |
Number of retries for failed network requests |
RATE_LIMIT_DELAY |
1.0 |
Minimum seconds between rate-limited requests |
OUTPUT_DIR |
scan_results |
Directory for storing exported reports |
HEADLESS |
true |
Run browser in headless mode (no visible window) |
LOG_LEVEL |
INFO |
Logging verbosity: DEBUG, INFO, WARNING, ERROR, CRITICAL |
python3 -m api_scanner.main- Enter a target URL in the Scanner tab
- Click "Scan" to start the browser-based analysis
- View captured API endpoints and network requests in the Results tab
- Check Security tab for threat analysis results
- Export reports in JSON, CSV, or HTML format via the Reports tab
- JSON: Complete structured data with metadata, ideal for programmatic access
- CSV: Tabular data split into requests.csv, api_endpoints.csv, and responses.csv
- HTML: Self-contained professional report with embedded CSS, suitable for sharing
# Clone and install in development mode
git clone https://github.com/your-username/Api_Scanner_Bot.git
cd Api_Scanner_Bot
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
playwright install chromium# Run full test suite
python3 -m pytest tests/ -v
# Run specific test module
python3 -m pytest tests/test_threat_analyzer.py -v
# Run with coverage (if pytest-cov installed)
python3 -m pytest tests/ --cov=api_scanner -v# Check all files compile without errors
python3 -m py_compile api_scanner/__init__.py
python3 -m py_compile api_scanner/main.py
# Verify imports work
python3 -c "import api_scanner; print(api_scanner.__version__)"# เคชเฅเคฐเคพ test suite เคเคฒเคพเคเค
python3 -m pytest tests/ -v
# Specific module test เคเคฐเฅเค
python3 -m pytest tests/test_threat_analyzer.py -vThis project is licensed under the MIT License.
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Write tests for your changes
- Ensure all tests pass (
python3 -m pytest tests/ -v) - Commit your changes with descriptive messages
- Push and open a Pull Request