A Python API built with FastAPI that notifies a Discord webhook whenever the /oob endpoint is accessed. Designed for security monitoring, Cross-Site Scripting (XSS) research, and Out-of-Band (OOB) interaction detection.
- FastAPI: High performance, asynchronous API framework.
- Discord Integration: Sends rich embeds with detailed request information.
- Rate Limiting: Prevents webhook spamming (5 requests/minute per IP).
- Unicode Normalization (NFKC): Flattens malicious homograph characters to prevent bypasses.
- Control Character Removal: Strips non-printable characters while preserving necessary formatting.
- Discord Evasion Protection: Replaces backticks (
`) with harmless look-alikes to prevent code block breakouts. - Mention Protection: Automatically escapes
@everyoneand@hereto prevent unauthorized notifications. - Strict Truncation: Ensures all fields stay within Discord's 1024-character limit to prevent API errors.
- Optimized: Uses connection pooling with a single
httpx.AsyncClientfor high-concurrency performance. - PEP 8 & Black: Code follows standard Python formatting and best practices.
- Dockerized: Easy deployment using a single Docker container.
-
Build the image:
docker build -t oob-er . -
Run the container: Pass your Discord Webhook URL as an environment variable:
docker run -d -p 8000:8000 --env DISCORD_WEBHOOK_URL="your_webhook_url_here" oob-er
-
Install dependencies:
pip install -r requirements.txt
-
Configure Environment: Copy
.env.exampleto.envand add your Discord Webhook URL.cp .env.example .env
-
Run the API:
python main.py
Once the server is running, make a GET request to:
http://localhost:8000/oob?param1=value1¶m2=value2
The API will capture and sanitize:
- Date (UTC): Human-readable timestamp.
- URL: The full request URL.
- Client IP: Captured securely (supports
X-Forwarded-Forfor proxies). - HTTP Method: GET, POST, etc.
- Query Parameters: Full JSON representation.
- Cookies: Full JSON representation.
- Headers: Full request headers.
By default, the /oob endpoint is limited to 5 requests per minute per client IP to prevent abuse and webhook flooding.