Xerxes icon XERXES / 0.5.1
DarkMatter Software · Bot Intelligence Network

XERXES KNOW EVERY BOT · SEE EVERY REQUEST · CONTROL EVERY ACCESS

Xerxes is an operator-driven bot intelligence, request classification, behavior scoring, analytics, and controlled-response platform built around a simple principle: observe first, understand second, act deliberately.

Version 0.5.1 Locked PHP + Apache + SQLite Dark Emperor UI BrainSurgeon Analytics OXIDE Transport Ollama Assisted
0.5.1Locked Baseline
LiveRequest Detection
Read-OnlyAI Tooling
SharedDark Emperor Theme
ModularUtility Layer
System Identity

What Xerxes Is

Xerxes is a bot traffic reality controller. It does not reduce every automated request to a binary block/allow decision. It observes, classifies, scores, records, routes, and gives the operator a deliberate response surface.

Request
Observe
Classify
Decide
Respond

Detection

User-agent rules, runtime scoring, request telemetry, live diagnostics, and known automation signatures form the first layer.

Behavior Scoring

Xerxes scores request patterns instead of relying on static signatures alone, allowing evidence to accumulate before action.

Controlled Response

Observe, redirect, block, hard-block, or serve alternate payloads. The operator controls perception instead of merely denying access.

Execution Model

Architecture

Xerxes separates fast routing, application intelligence, storage, analytics, and operator tooling so each layer has one job.

INTERNET / CLIENT
      │
      ▼
APACHE + .htaccess
      │
      ├── Active Bot Rules
      ├── Internal endpoint protections
      └── Hard-block section
      │
      ▼
XERXES PHP ENGINE
      │
      ├── detect.php
      ├── scoring / classification
      ├── analytics
      ├── payload routing
      └── AI tool bridge
      │
      ▼
SQLITE + LOG STORES
      │
      ├── bot rules
      ├── request telemetry
      └── settings
      │
      ├──────────────► BrainSurgeon
      │
      └──────────────► Ollama Operator Analysis

Apache First

Known bot routing and hard blocks stay cheap and close to the edge.

PHP Intelligence

Classification, scoring, live diagnostics, operator state, and response control live in the application layer.

SQLite Core

Portable storage keeps Xerxes self-contained and deployable without a separate database server.

Operator Intelligence

AI-Assisted, Not AI-Controlled

Xerxes 0.5.1 uses a hybrid operator model: deterministic application tools answer facts directly, while Ollama is reserved for interpretation and analysis.

Xerxes Answers Facts

  • Active bot rules
  • Recent logs
  • Hard-block state
  • Dashboard summary
  • Behavior score data
  • Rule-overlap diagnostics

Ollama Analyzes Context

  • Rule design review
  • Traffic interpretation
  • False-positive reasoning
  • Evidence-based recommendations
  • Operator-readable summaries

Human Stays in Control

AI output is advisory. Xerxes does not grant the model autonomous access to modify rules, hard blocks, .htaccess, configuration, or stored data.

Temperature0.30 default
Context4096 tokens
Standard640 output tokens
Analysis1024+ output tokens
Utility / Intelligence

BrainSurgeon

BrainSurgeon is Xerxes' deeper analysis utility. It reads the live Xerxes data stores, profiles IP behavior, reassesses scores, identifies attack paths, builds block candidates, and exports operator-reviewable reports.

Live Inputs

SQLite logs, active bot inventory, hit logs, Apache access logs, and external tracking data.

Outputs

HTML report, JSON summary, IP profile CSV, block candidate JSON/CSV, and reviewable Apache block suggestions.

Shared Theme

Generated BrainSurgeon reports now use the canonical Xerxes Dark Emperor stylesheet instead of carrying a private embedded skin.

Xerxes UI
   ↓
BrainSurgeon Report
   ↓
run_report.php
   ↓
run.sh
   ↓
Python analyzer
   ↓
LIVE Xerxes data
   ↓
reports/brain_surgeon_report.html
Transport / Messaging

OXIDE · Network Messaging Interface

OXIDE replaces the earlier XMS/Snugglez client with one transport core and two front ends: GUI and CLI.

Identity

OXIDE
Network Messaging Interface
OXIDE/1.0 (XIDE-Transport; CLI)

Dual Mode

./launch.sh
./cli.sh --check
./cli.sh --status

Shared Transport

GUI and CLI consume the same transport layer, keeping network behavior consistent across both modes.

Runtime Control

Active Bot Rules + Hard Blocks

The locked 0.5.1 baseline preserves predefined Active Bot Rules while keeping accumulated traffic state separate. Rule identity and intent survive a fresh start; collected observations do not.

LayerPurposeOperator Expectation
Active Bot RulesKnown user-agent patterns and actionsPersistent configuration
Hard BlocksExplicit IP-level enforcementEditable without regenerating unrelated Apache rules
LogsObserved trafficClearable / fresh-start capable
Behavior ScoresEvidence-driven request classificationDerived from current traffic state
Diagnostics

Live Detect

detect.php is the direct live diagnostic endpoint. It classifies the current request and returns structured JSON without redirecting or blocking the operator's diagnostic request.

{
  "ok": true,
  "user_agent": "Mozilla/5.0 ...",
  "result": {
    "classification": {
      "category": "likely_human",
      "score": 0.79,
      "signals": [
        "ua:version-token",
        "req:runtime-endpoint"
      ],
      "decision": "allow"
    },
    "matched_bot": null,
    "engine": "scoring"
  }
}
Deployment

Installation + Permissions

Xerxes is designed for a conventional Apache/PHP deployment with writable runtime directories and protected internal files.

Core Placement

/var/www/html/xerxes/

Keep Xerxes self-contained under one application root.

Writable Runtime

data/
logs/
utilities/BrainSurgeon/reports/

Apache/PHP must be able to create SQLite WAL files, logs, and generated reports.

Protect Sensitive Files

Configuration, database internals, shell scripts, dumps, backups, and private application files should never be directly exposed.

sudo chown -R www-data:www-data data logs
sudo chmod 775 data logs
sudo chmod 664 data/xerxes.sqlite

sudo chown -R www-data:www-data utilities/BrainSurgeon/reports
sudo chmod 775 utilities/BrainSurgeon/reports
sudo chmod 664 utilities/BrainSurgeon/reports/*
Verification

Testing

Live Detect

curl -i \
  -A "Mozilla/5.0" \
  http://localhost/xerxes/detect.php

Known Bot Simulation

curl -i \
  -A "Googlebot/2.1" \
  http://localhost/xerxes/detect.php

Dashboard

curl -i \
  http://localhost/xerxes/api/dashboard.php

Remember that Apache rules may intentionally route known automation before PHP sees it. Test both the direct diagnostic endpoint and real application routes.

Filesystem

Current Project Shape

/xerxes/
├── index.php
├── detect.php
├── payload_router.php
├── config.php
├── .htaccess
│
├── api/
│   ├── dashboard.php
│   ├── ollama.php
│   └── ai_tools.php
│
├── includes/
│   ├── ai_bridge.php
│   ├── analytics.php
│   ├── db.php
│   ├── functions.php
│   ├── htaccess.php
│   └── log_parser.php
│
├── templates/
│   ├── header.php
│   ├── footer.php
│   ├── images/
│   │   ├── icon.png
│   │   └── ogimage.png
│   └── css/
│       └── style.css
│
├── data/
│   ├── xerxes.sqlite
│   └── external.log
│
├── logs/
│   ├── access.log
│   └── hits.log
│
├── payloads/
│
└── utilities/
    ├── BrainSurgeon/
    └── OXIDE/
Design Philosophy

Operator First

PrincipleMeaning
Observe Before ActingGather evidence before escalating response.
Deterministic FactsXerxes itself answers questions the database can answer exactly.
AI for InterpretationOllama explains and reasons over supplied Xerxes context rather than inventing application state.
Operator AuthorityBlocking, rule changes, and configuration remain explicit operator actions.
One Theme SurfaceXerxes and generated utility reports share the same Dark Emperor visual system.
Portable CorePHP + Apache + SQLite keeps deployment compact and understandable.
Locked Baseline

Xerxes 0.5.1

Version 0.5.1 is the current locked baseline: a clean-data, preserved-rules build with repaired diagnostics, stable storage permissions, improved hard-block handling, shared visual identity, working BrainSurgeon integration, OXIDE transport, and a useful hybrid AI/tool layer.

✓ Fresh Operational State

Historical observation data can be cleared without erasing the predefined bot-rule configuration.

✓ Active Rules Preserved

Bot rules remain the stable policy layer while logs, scores, matches, and tracking data evolve independently.

✓ Unblock Stability

IP block management is separated from unrelated Apache rule regeneration.

✓ BrainSurgeon Live

Reports run against the current Xerxes data and share the canonical theme.

✓ OXIDE Live

Network messaging now has a unified GUI/CLI transport client.

✓ Live Detect Repaired

The diagnostic endpoint returns structured classification data instead of falling through into the site's 404 handler.

XERXES 0.5.1
STATUS: LOCKED
MODE: OPERATOR CONTROLLED
INTELLIGENCE: ACTIVE
AUTONOMOUS CONFIG CHANGES: DISABLED
Evolution

Road Forward

Context Expansion

Deeper AI context selection across behavior scores, dashboard state, BrainSurgeon summaries, and rule inventory.

Transport Growth

OXIDE can evolve from message-of-the-day transport into a broader XIDE-facing network messaging surface.

Analytics Refinement

Continue improving evidence quality, confidence reporting, and operator-facing explanations without automating destructive actions.