Version: 0.1.1-dev (Locked Build)
Platform: PHP + Apache (Shared Hosting Compatible)
This document explains what Xerxes is, what it does, how it works, how to install and test it, and where it is meant to evolve next.
Xerxes is a traffic control system for bots and automated agents.
It does not simply block bots. Instead, it detects bot-like behavior, classifies incoming requests, decides how each request should be handled, and controls what the requester is allowed to see.
Xerxes is not a firewall.
It is a system that determines what each visitor is allowed to perceive.
Traditional systems follow this pattern:
Bot → Block
Xerxes follows this pattern:
Bot → Observe → Classify → Decide → Respond
Blocking is easy. Controlling perception is powerful.
Xerxes is designed not just to block, but to control what automated systems experience.
Request → Classified → Routed → Controlled Response
This transforms Xerxes from a defensive system into an active intelligence layer.
Internet → WAF → Xerxes → Response
Blocks obvious abuse, rate limits floods, and protects server resources.
Analyzes requests, classifies user agents, logs activity, and determines behavior.
Executes rules quickly and efficiently before PHP has to do heavy work.
detect.php for real-time classification and optional logging.This represents the upcoming visual intelligence layer. Current build prepares the data pipeline.
3.2 (Simulated)
/xerxes/
│
├── index.php → Control panel (login protected)
├── detect.php → Live detection endpoint
├── payload_router.php → Payload handling (future expansion)
│
├── /includes/
│ ├── db.php
│ ├── analytics.php
│
├── /data/
│ ├── xerxes.sqlite
│ ├── parse_state.json
│
├── /payloads/
│ ├── botpot.json
│ ├── empty-feed.xml
│ ├── null.html
│
├── config.php → Core configuration (sensitive)
/xerxes/ directory into your site root, such as /public_html/xerxes/..htaccess.RewriteEngine On
# Xerxes safe zone
RewriteCond %{REQUEST_URI} ^/xerxes/ [NC]
RewriteRule ^ - [L]
chmod 755 xerxes/
chmod 644 *.php
chmod 755 data/
http://yourdomain.com/xerxes/
The control panel uses a token stored in config.php. This token must be changed before the system is exposed publicly.
'auth' => [
'token' => 'change-me-now-xerxes-dev-token',
'session_key' => 'xerxes_auth',
],
Protect sensitive files. Even if PHP is configured correctly, deny direct access explicitly.
<FilesMatch "^(config\.php|.*\.sqlite)$">
Require all denied
</FilesMatch>
config.php.curl -A "Mozilla/5.0" http://yourdomain.com/xerxes/detect.php
curl -A "Googlebot/2.1 (+http://www.google.com/bot.html)" http://yourdomain.com/xerxes/detect.php
for i in {1..50}; do
curl -s -A "TestBot$i" http://yourdomain.com/xerxes/detect.php &
((i % 10 == 0)) && wait
done
wait
Use browser-like UAs when testing through environments with aggressive WAF rules. Curl with default UA may be blocked before Xerxes ever sees the request.
The WAF may block default curl and obvious bot-like traffic before Xerxes runs. This is expected in hardened environments.
Xerxes includes its own internal micro-throttling for traffic that is allowed through.
At the moment, bots that reach /xerxes/ generally see the login wall unless routed elsewhere intentionally.
Core runtime values are stored in config.php.
'runtime' => [
'enabled' => true,
'log_live_hits' => true,
'rate_limit' => true,
'rate_window' => 1,
'rate_hits' => 5,
'force_full_detection' => false,
'debug' => false,
]
These settings allow live request logging, basic internal rate limiting, and future expansion into deeper behavior analysis.
Xerxes now introduces a scoring system that evaluates each request based on behavioral indicators instead of relying solely on static signatures.
Score Range:
0 → Likely Human
1–3 → Suspicious
4–6 → Automated / Scripted
7+ → Aggressive / Bot / Scanner
| Principle | Meaning |
|---|---|
| Separation of Responsibility | WAF blocks obvious threats, Xerxes makes intelligent decisions, Apache executes efficiently. |
| Portability | No external services, no WordPress dependency, and minimal installation requirements. |
| Control Over Blocking | Xerxes is meant to decide what bots see, not merely keep them out. |
/xerxes/..htaccess block..htaccess clean and avoid scattered edits.Behavioral scoring, request frequency analysis, fingerprinting, and header anomaly detection.
Dynamic payload assignment, bot-specific responses, fake APIs, and shaped realities.
Memory of interactions, staged deception, evolving responses, and long-term tracking.
Live visualizations, traffic breakdowns, trend analysis, and operator intelligence.
Self-adjusting rules, pattern learning, and tuned automated responses.
Xerxes is not designed to stop bots.
It is designed to let them in,
study them,
and decide what version of reality they experience.