FFFF ShadowPass/python at main · NotUnHackable/ShadowPass · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History

README.md

ShadowPass Python

  _____ _               _                _____              
 / ____| |             | |              |  __ \             
| (___ | |__   __ _  __| | _____      __| |__) |_ _ ___ ___ 
 \___ \| '_ \ / _` |/ _` |/ _ \ \ /\ / /|  ___/ _` / __/ __|
 ____) | | | | (_| | (_| | (_) \ V  V / | |  | (_| \__ \__ \
|_____/|_| |_|\__,_|\__,_|\___/ \_/\_/  |_|   \__,_|___/___/

Advanced 40X HTTP Error Bypass Tool - Python Edition

A comprehensive Python application for automating the bypass of 40X HTTP error pages (403 Forbidden, 404 Not Found, 401 Unauthorized) using multiple evasion techniques.

⚠️ WARNING: This tool is intended for authorized security testing and educational purposes only. Unauthorized access to computer systems is illegal. Always obtain proper authorization before testing any systems you do not own.

Features

Core Capabilities

  • Multiple Bypass Techniques: Header spoofing, method tampering, path fuzzing, and more
  • Proxy Rotation: Support for custom proxy lists, Bright Data, and ScrapingBee
  • Tor Integration: Anonymous requests via the Tor network with circuit refresh
  • VPN Support: OpenVPN and WireGuard integration
  • Browser Automation: Headless Chrome/Firefox with undetected-chromedriver
  • CAPTCHA Solving: 2Captcha and Anti-Captcha integration
  • Rate Limiting: Exponential backoff and jitter for evasion

Evasion Techniques

  • Header Spoofing: X-Forwarded-For, Origin, Referer, User-Agent rotation
  • Method Tampering: HTTP method override headers, verb tampering
  • Path Fuzzing: Case variation, URL encoding, path traversal
  • IP Spoofing Headers: 20+ different headers to spoof client IP
  • Cookie Manipulation: Session handling and cookie spoofing

Installation

Quick Install

# Clone the repository
cd ShadowPass/python

# Install with pip (basic)
pip install .

# Install with all features
pip install ".[all]"

# Or install specific features
pip install ".[browser,tor,captcha]"

Using Bun/npm (for development)

# Since this is a Python project, use pip or virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS
pip install -e ".[dev,all]"

Optional Dependencies

Feature Package Install Command
Browser Automation selenium, undetected-chromedriver pip install ".[browser]"
Tor Network stem pip install ".[tor]"
CAPTCHA Solving 2captcha-python, python-anticaptcha pip install ".[captcha]"
ML CAPTCHA pytesseract, opencv-python pip install ".[ml]"
Async Support aiohttp pip install ".[async]"

Usage

Command Line Interface

# Basic bypass attempt
shadowpass bypass http://example.com/admin

# With custom headers
shadowpass bypass -H "Authorization: Bearer token" http://example.com/api

# Using Tor
shadowpass bypass --tor http://example.com/restricted

# With proxy
shadowpass bypass -x http://proxy:8080 http://example.com/admin

# Using headless browser
shadowpass bypass --browser http://example.com/js-protected

# Batch processing
shadowpass batch urls.txt -j 10 -o results.json

# Scan for working techniques
shadowpass scan http://example.com/admin -o techniques.json

# Generate config file
shadowpass init

# Test connections
shadowpass test-connection
shadowpass test-proxy http://proxy:8080

Python API

from shadowpass import ShadowPassClient, ShadowPassConfig

# Basic usage
with ShadowPassClient() as client:
    result = client.bypass("http://example.com/admin")
    
    if result.success:
        print(f"Bypass successful using: {result.technique_used}")
        print(f"Status: {result.original_status} -> {result.final_status}")
        print(result.response_body)
    else:
        print(f"Bypass failed after {result.attempts} attempts")

# With custom configuration
config = ShadowPassConfig()
config.proxy.enabled = True
config.proxy.proxy_list = ["http://proxy1:8080", "http://proxy2:8080"]
config.tor.enabled = True
config.evasion.header_spoofing = True
config.retry.max_retries = 10

client = ShadowPassClient(config)
result = client.bypass("http://example.com/admin")
client.close()

# Async batch processing
import asyncio

async def scan_targets():
    with ShadowPassClient() as client:
        urls = [
            "http://example.com/admin",
            "http://example.com/api",
            "http://example.com/internal"
        ]
        results = await client.bypass_async(urls, concurrency=5)
        return results

results = asyncio.run(scan_targets())

Using Individual Components

from shadowpass.evasion.headers import HeaderSpoofer
from shadowpass.evasion.paths import PathFuzzer
from shadowpass.proxy.manager import ProxyManager
from shadowpass.network.tor_handler import TorHandler

# Header spoofing
spoofer = HeaderSpoofer()
headers = spoofer.get_bypass_headers_set("http://example.com/admin")

# Path fuzzing
fuzzer = PathFuzzer()
variations = fuzzer.generate_all_variations("http://example.com/admin")

# Proxy rotation
manager = ProxyManager()
manager.add_proxies(["http://proxy1:8080", "http://proxy2:8080"])
proxy = manager.get_next_proxy()

# Tor integration
with TorHandler() as tor:
    if tor.connect():
        tor.refresh_circuit()
        proxy = tor.get_socks_proxy()
        ip = tor.get_current_ip()
        print(f"Current Tor IP: {ip}")

Configuration

YAML Configuration

# shadowpass.yaml
proxy:
  enabled: true
  rotation_enabled: true
  proxy_list:
    - http://proxy1:8080
    - http://proxy2:8080

tor:
  enabled: true
  control_port: 9051
  socks_port: 9050

evasion:
  header_spoofing: true
  user_agent_rotation: true
  method_tampering: true
  path_fuzzing: true

retry:
  max_retries: 5
  switch_proxy_on_fail: true

Environment Variables

export BRIGHT_DATA_API_KEY=your_key
export SCRAPINGBEE_API_KEY=your_key
export TOR_CONTROL_PASSWORD=your_password
export CAPTCHA_API_KEY=your_key

Bypass Techniques Explained

1. Header Spoofing

Manipulates HTTP headers to appear as a different client:

  • X-Forwarded-For: 127.0.0.1 - Spoof internal IP
  • X-Original-URL / X-Rewrite-URL - Path override
  • Various IP headers (20+ supported)

2. Method Tampering

Uses HTTP method override techniques:

  • X-HTTP-Method-Override header
  • Different HTTP verbs (GET, POST, PUT, OPTIONS, etc.)
  • Method case variations

3. Path Fuzzing

Manipulates URL paths to bypass restrictions:

  • Case variations (/Admin, /ADMIN)
  • URL encoding (%2f, %252f)
  • Path suffixes (/./, /..;/)
  • Extensions (.json, .html)

4. User-Agent Rotation

Rotates through legitimate browser User-Agent strings to avoid fingerprinting.

5. Proxy/Tor Rotation

Distributes requests across multiple IP addresses.

Project Structure

shadowpass/
├── __init__.py           # Package initialization
├── cli.py                # Command-line interface
├── core/
│   ├── client.py         # Main ShadowPass client
│   └── config.py         # Configuration management
├── evasion/
│   ├── headers.py        # Header spoofing
│   ├── methods.py        # Method tampering
│   ├── paths.py          # Path fuzzing
│   └── techniques.py     # Evasion engine
├── proxy/
│   └── manager.py        # Proxy rotation
├── network/
│   ├── tor_handler.py    # Tor integration
│   └── vpn_handler.py    # VPN integration
├── browser/
│   └── selenium_driver.py # Browser automation
├── captcha/
│   └── solver.py         # CAPTCHA solving
└── utils/
    ├── logger.py         # Logging utilities
    └── rate_limiter.py   # Rate limiting

Legal Disclaimer

This tool is provided for educational and authorized security testing purposes only. The authors are not responsible for any misuse of this software. Users must ensure they have proper authorization before testing any systems.

Always:

  • Obtain written permission before testing
  • Follow responsible disclosure practices
  • Comply with all applicable laws and regulations
  • Use in controlled environments when possible

License

MIT License - See LICENSE file for details.

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

Acknowledgments

  • Inspired by the original Go-based byp4xx tool
  • Header lists based on various bug bounty resources
  • User agents from SecLists project
0