Add Loki and Sentinel utility classes for web API endpoints

- Implemented LokiUtils class with GET and POST endpoints for managing scripts, jobs, and payloads.
- Added SentinelUtils class with GET and POST endpoints for managing events, rules, devices, and notifications.
- Both classes include error handling and JSON response formatting.
This commit is contained in:
infinition
2026-03-14 22:33:10 +01:00
parent eb20b168a6
commit aac77a3e76
525 changed files with 29400 additions and 13136 deletions

View File

@@ -82,22 +82,40 @@
"settings.tooltip.bruteforce_exhaustive_max_candidates": "Maximum generated candidates for exhaustive bruteforce.",
"theme.group.colors": "Colors",
"theme.group.surfaces": "Surfaces",
"theme.group.borders": "Borders",
"theme.group.controls": "Controls",
"theme.group.layout": "Layout",
"theme.token.bg": "Background",
"theme.token.bg2": "Background Alt",
"theme.token.ink": "Text Color",
"theme.token.muted": "Muted Text",
"theme.token.accent1": "Accent 1 (Acid)",
"theme.token.accent2": "Accent 2 (Cyan)",
"theme.token.accent": "Accent",
"theme.token.accentAlt": "Accent Alt",
"theme.token.danger": "Danger",
"theme.token.warning": "Warning",
"theme.token.ok": "Success",
"theme.token.panel": "Panel",
"theme.token.panel2": "Panel Alt",
"theme.token.ctrlPanel": "Control Panel",
"theme.token.ctrlPanel2": "Control Panel Alt",
"theme.token.btnBg": "Button Background",
"theme.token.border": "Border",
"theme.token.borderStrong": "Border Strong",
"theme.token.borderHi": "Border Highlight",
"theme.token.switchTrack": "Switch Track",
"theme.token.switchOnBg": "Switch On BG",
"theme.token.scrollTrack": "Scrollbar Track",
"theme.token.scrollThumb": "Scrollbar Thumb",
"theme.token.glass": "Glass Overlay",
"theme.token.radius": "Border Radius",
"theme.advanced": "Advanced CSS",
"theme.applyRaw": "Apply",
"theme.reset": "Reset to Default",
"theme.export": "Export Theme",
"theme.import": "Import Theme",
"theme.importError": "Invalid theme file",
"dash.title": "Dashboard",
"dash.battery": "Battery",
"dash.internet": "Internet",
@@ -819,5 +837,417 @@
"api.timeout": "Request timed out",
"api.failed": "Request failed",
"router.notFound": "Page not found: {{path}}",
"router.errorLoading": "Error loading page: {{message}}"
"router.errorLoading": "Error loading page: {{message}}",
"sched.filterPlaceholder": "Filter (action, MAC, IP, host, service, port...)",
"sched.focusActive": "Focus active",
"sched.compact": "Compact",
"sched.collapse": "Collapse",
"sched.expand": "Expand",
"sched.showSuperseded": "+ superseded",
"sched.hideSuperseded": "- superseded",
"sched.noEntries": "No entries",
"sched.entries": "entries",
"sched.displayMore": "Display more\u2026",
"sched.fetchError": "Queue fetch error",
"sched.cmdFailed": "Command failed",
"sched.noHistory": "No history",
"sched.historyColorCoded": "Rows are color-coded by status.",
"sched.port": "Port",
"sched.service": "Svc",
"sched.eligibleIn": "Eligible in",
"sched.elapsed": "Elapsed",
"sched.due": "due",
"sched.created": "created",
"sched.started": "started",
"sched.retries": "retries",
"sched.retry": "retry",
"sched.priority": "prio",
"studio.autoLayout": "Auto-layout",
"studio.repel": "Repel",
"studio.apply": "Apply",
"studio.help": "Help",
"studio.filterActions": "Filter actions...",
"studio.filterHosts": "Filter host/IP/MAC...",
"studio.total": "total",
"studio.placed": "placed",
"studio.alive": "alive",
"studio.availableActions": "Available actions",
"studio.realHosts": "Real hosts",
"studio.testHosts": "Test hosts",
"studio.createTestHost": "Create test host",
"studio.selectedAction": "Selected action",
"studio.selectNodeToEdit": "Select a node to edit it",
"studio.selectedHost": "Selected host",
"studio.addHost": "Add host",
"studio.fitGraph": "Fit graph",
"studio.saveToDb": "Save to DB",
"studio.importActionsDb": "Import actions DB",
"studio.importStudioDb": "Import studio DB",
"studio.tips": "Tips",
"studio.tipsText": "Drag background to pan, mouse wheel/pinch to zoom, connect ports to link nodes.",
"studio.shortcuts": "Studio shortcuts",
"studio.navigation": "Navigation",
"studio.keyboard": "Keyboard",
"studio.shortcutZoom": "Mouse wheel / pinch: zoom",
"studio.shortcutPan": "Drag canvas background: pan",
"studio.shortcutDragNode": "Drag node: move node",
"studio.shortcutFit": "F: fit graph to viewport",
"studio.shortcutSave": "Ctrl/Cmd + S: save to DB",
"studio.shortcutEsc": "Esc: close menus / sidebars / modals",
"studio.shortcutDelete": "Delete: delete selected node",
"studio.success": "success",
"studio.failure": "failure",
"studio.requires": "requires",
"studio.pinchHint": "Pinch/scroll = zoom, drag = pan, connect ports to create links",
"studio.nodesCount": "nodes",
"studio.linksCount": "links",
"studio.noActionsMatch": "No actions match this filter.",
"studio.noRealHostsMatch": "No real hosts match this filter.",
"studio.noTestHostsYet": "No test hosts yet.",
"studio.saved": "Saved",
"studio.localBackup": "Local backup (DB unavailable)",
"studio.applied": "Applied to runtime",
"studio.applyFailed": "Apply runtime failed",
"studio.autoLayoutApplied": "Auto-layout applied",
"studio.actionUpdated": "Action updated",
"studio.hostUpdated": "Host updated",
"studio.testHostDeleted": "Test host deleted",
"studio.testHostCreated": "Test host created",
"studio.macExists": "MAC already exists",
"studio.deleteTestHost": "Delete this test host?",
"studio.link": "Link",
"studio.from": "From",
"studio.to": "To",
"studio.linkContext": "Choose behavior (trigger or requirement). Presets adapt to node types.",
"studio.mode": "Mode",
"studio.preset": "Preset",
"studio.trigger": "Trigger",
"studio.requirement": "Requirement",
"studio.param1": "Param 1",
"studio.param2": "Param 2",
"studio.preview": "Preview",
"studio.validate": "Validate",
"studio.removeFromCanvas": "Remove from canvas",
"studio.deleteFromCanvas": "Delete from canvas",
"studio.addCondition": "+ Condition",
"studio.addTestHost": "Add test host",
"studio.closePanel": "Close panel",
"studio.openPalette": "Open palette",
"studio.openInspector": "Open inspector",
"vulns.totalCVEs": "Total CVEs",
"vulns.active": "Active",
"vulns.remediated": "Remediated",
"vulns.hosts": "Hosts",
"vulns.withExploit": "w/ Exploit",
"vulns.kev": "KEV",
"vulns.updateFeeds": "Update Exploit Feeds",
"vulns.sortBy": "Sort by",
"vulns.cvssScore": "CVSS Score",
"vulns.lastSeen": "Last Seen",
"vulns.firstSeen": "First Seen",
"vulns.dateFilter": "Date filter (last seen)",
"vulns.clearDates": "Clear dates",
"vulns.cveView": "CVE View",
"vulns.hostView": "Host View",
"vulns.exploits": "Exploits",
"vulns.lastRefresh": "Last refresh: {{time}}",
"vulns.downloading": "Downloading…",
"vulns.syncingFeeds": "Syncing CISA KEV, Exploit-DB, EPSS…",
"vulns.noSyncYet": "No sync yet — click to update.",
"vulns.lastSync": "Last sync: {{date}} · {{count}} exploits",
"vulns.clickDetails": "click for details",
"vulns.noHostsFound": "No hosts found",
"vulns.vulnsCount": "{{count}} vulns",
"vulns.fixed": "FIXED",
"vulns.maxCvss": "Max CVSS",
"vulns.noExploitData": "No exploit data yet",
"vulns.searchExploits": "Search All Exploits now",
"vulns.filterHistory": "Filter history…",
"vulns.noHistory": "No history entries",
"vulns.pageInfo": "Page {{page}}/{{total}} — {{count}} entries",
"vulns.resultsInfo": "Page {{page}}/{{total}} — {{count}} results",
"vulns.score": "Score",
"vulns.probability": "Probability",
"vulns.percentile": "Percentile",
"vulns.cisaKev": "CISA KEV",
"vulns.cisaKevMsg": "This vulnerability is in the CISA Known Exploited Vulnerabilities catalog.",
"vulns.epss": "EPSS",
"vulns.affectedProducts": "Affected Products",
"vulns.product": "Product",
"vulns.versions": "Versions",
"vulns.exploitsRefs": "Exploits & References",
"vulns.noExploitRecords": "No exploit records in DB yet — use \"Search All Exploits\" to enrich.",
"vulns.references": "References",
"vulns.lastModified": "Last Modified",
"vulns.noEnrichment": "No enrichment data available.",
"vulns.github": "GitHub",
"vulns.rapid7": "Rapid7",
"vulns.nvd": "NVD",
"vulns.mitre": "MITRE",
"vulns.na": "N/A",
"vulns.unknown": "Unknown",
"dash.auto": "AUTO",
"dash.manual": "MANUAL",
"dash.lvl": "LVL {{level}}",
"dash.on": "ON",
"dash.off": "OFF",
"dash.yes": "YES",
"dash.no": "NO",
"dash.ssid": "SSID",
"dash.ip": "IP",
"dash.gw": "GW",
"dash.dns": "DNS",
"dash.fds": "FDS",
"dash.fix": "Fix",
"dash.sats": "Sats",
"dash.osLabel": "OS",
"dash.arch": "Arch",
"dash.model": "Model",
"dash.waveshare": "Waveshare E-Ink",
"dash.bjorn": "BJORN",
"dash.cpuRam": "CPU/RAM",
"dash.device": "Device",
"dash.equalSinceScan": "= since last scan",
"netkb.ip": "IP",
"netkb.mac": "MAC",
"netkb.vendor": "Vendor",
"netkb.essid": "ESSID",
"netkb.toggleOffline": "Toggle offline",
"netkb.hasPorts": "Has ports",
"netkb.hasActions": "Has actions",
"netkb.na": "N/A",
"netkb.success": "Success",
"netkb.failed": "Failed",
"netkb.running": "Running",
"netkb.pending": "Pending",
"netkb.expired": "Expired",
"netkb.cancelled": "Cancelled",
"netkb.at": "at",
"network.unknownHost": "Unknown host",
"network.showHostname": "Show hostname",
"network.d3Unavailable": "D3 library not available for map view.",
"network.portLabel": "Port {{label}}",
"network.clear": "Clear",
"creds.all": "All",
"creds.copied": "Copied to clipboard!",
"creds.noCredentials": "No credentials",
"creds.credentialsCount": "Credentials: {{count}}",
"creds.searchDots": "Search...",
"creds.downloadCsv": "Download CSV",
"creds.clickToCopy": "Click to copy",
"creds.services": "Services",
"webenum.searchPlaceholder": "Search host, IP, directory, status…",
"webenum.allHosts": "All Hosts",
"webenum.allStatus": "All Status",
"webenum.allPorts": "All Ports",
"webenum.noResults": "No web enumeration results found",
"webenum.actions": "Actions",
"webenum.open": "Open",
"webenum.perPage": "Per page:",
"webenum.resultCount": "{{count}} result(s)",
"webenum.showingAll": "Showing all {{count}} result(s)",
"webenum.prev": "Prev",
"webenum.next": "Next",
"webenum.pageInfo": "Page {{page}} of {{total}} ({{count}} results)",
"webenum.truncated": "{{count}} (truncated)",
"webenum.openUrl": "Open URL",
"webenum.copyUrl": "Copy URL",
"files.newFolder": "New Folder",
"files.confirmDeleteMulti": "Delete {{count}} item(s)?",
"files.moveTitle": "Move {{count}} item(s) to...",
"files.moveTo": "Move to...",
"files.switchToList": "Switch to list view",
"files.switchToGrid": "Switch to grid view",
"files.copySuffix": " (copy)",
"loot.treeView": "Tree View",
"loot.filesCount": "{{count}} files",
"db.views": "Views",
"db.tables": "Tables",
"db.addRowBtn": "+Row",
"db.csv": "CSV",
"db.json": "JSON",
"db.vacuum": "VACUUM",
"db.truncate": "Truncate",
"db.drop": "Drop",
"db.rowsInfo": "{{shown}} of {{total}} rows",
"actions.autoClear": "Auto-clear",
"actions.autoClearOn": "Auto-clear ON",
"actions.autoClearOff": "Auto-clear OFF",
"actions.exportLogs": "Export",
"actions.selectAction": "Select an action to see logs",
"actions.waitingLogs": "Waiting for logs...",
"actions.logs.scriptCompleted": "Script completed",
"actions.docs": "Docs",
"actions.preset": "Preset {{n}}",
"actions.byAuthor": "by {{author}}",
"zombie.cpuRam": "CPU/RAM",
"zombie.connectedToC2": "Connected to C2 event stream",
"zombie.c2ConnectionLost": "C2 event stream connection lost",
"zombie.telemetryReceived": "Agent {{name}} telemetry received.",
"zombie.staleFound": "{{count}} stale agent(s) found (>5min)",
"zombie.staleCheck": "Stale check: {{count}} inactive >5min.",
"zombie.clientGenerated": "Client {{id}} generated",
"zombie.deployStarted": "Deployment to {{host}} started",
"zombie.noAgentsSelected": "No agents selected for command.",
"zombie.loadingFiles": "Loading...",
"zombie.browseCommandSent": "Browse command sent. Check console for output.",
"zombie.browseCommandFailed": "Failed to send browse command",
"zombie.uploadStarted": "File {{name}} upload started.",
"zombie.uploadFailed": "Failed to upload file.",
"zombie.sshHost": "SSH Host",
"zombie.sshUser": "SSH User",
"zombie.sshPass": "SSH Pass",
"zombie.avgCpu": "Avg CPU",
"zombie.avgRam": "Avg RAM",
"zombie.total": "Total",
"zombie.online": "Online",
"nav.sentinel": "Sentinel",
"sentinel.title": "Sentinel Watchdog",
"sentinel.enabled": "Enabled",
"sentinel.disabled": "Disabled",
"sentinel.eventFeed": "Event Feed",
"sentinel.ackAll": "Ack All",
"sentinel.clearAll": "Clear All",
"sentinel.allAcked": "All events acknowledged",
"sentinel.confirmClear": "Clear all events? This cannot be undone.",
"sentinel.eventsCleared": "Events cleared",
"sentinel.noEvents": "No events yet. Sentinel monitors your network for anomalies.",
"sentinel.rules": "Rules",
"sentinel.devices": "Devices",
"sentinel.notifiers": "Notifiers",
"sentinel.statDevices": "Known Devices",
"sentinel.statAlive": "Alive",
"sentinel.statUnread": "Unread",
"sentinel.statEvents": "Total Events",
"sentinel.statRules": "Active Rules",
"sentinel.addRule": "Add Rule",
"sentinel.noRules": "No rules configured.",
"sentinel.ruleLogic": "Logic",
"sentinel.ruleActions": "Actions",
"sentinel.enable": "Enable",
"sentinel.disable": "Disable",
"sentinel.editRule": "Edit Rule",
"sentinel.deleteRule": "Delete Rule",
"sentinel.confirmDeleteRule": "Delete this rule?",
"sentinel.ruleDeleted": "Rule deleted",
"sentinel.ruleUpdated": "Rule updated",
"sentinel.ruleCreated": "Rule created",
"sentinel.ruleName": "Rule Name",
"sentinel.triggerType": "Trigger Type",
"sentinel.cooldown": "Cooldown",
"sentinel.conditions": "Conditions",
"sentinel.cancel": "Cancel",
"sentinel.save": "Save",
"sentinel.nameRequired": "Rule name is required",
"sentinel.noDevices": "No devices discovered yet.",
"sentinel.trusted": "Trusted",
"sentinel.untrusted": "Untrusted",
"sentinel.alias": "Alias",
"sentinel.expectedIps": "Expected IPs",
"sentinel.lastSeen": "Last seen",
"sentinel.deviceSaved": "Device updated",
"sentinel.discordWebhook": "Discord Webhook",
"sentinel.webhookUrl": "Webhook URL",
"sentinel.smtpHost": "SMTP Host",
"sentinel.smtpPort": "SMTP Port",
"sentinel.smtpUser": "SMTP User",
"sentinel.smtpPass": "SMTP Password",
"sentinel.emailFrom": "Email From",
"sentinel.emailTo": "Email To",
"sentinel.saveNotifiers": "Save Notifiers",
"sentinel.notifiersSaved": "Notifier config saved",
"sentinel.justNow": "just now",
"sentinel.acknowledge": "Acknowledge",
"nav.bifrost": "Bifrost",
"bifrost.title": "Bifrost",
"bifrost.enabled": "Enabled",
"bifrost.disabled": "Disabled",
"bifrost.activityFeed": "Activity Feed",
"bifrost.clearActivity": "Clear",
"bifrost.activityCleared": "Activity cleared",
"bifrost.noActivity": "No activity yet. Enable Bifrost to start WiFi recon.",
"bifrost.networks": "Networks",
"bifrost.plugins": "Plugins",
"bifrost.history": "History",
"bifrost.mood": "Mood",
"bifrost.statNetworks": "Networks",
"bifrost.statHandshakes": "Handshakes",
"bifrost.statDeauths": "Deauths",
"bifrost.statAssocs": "Assocs",
"bifrost.statEpochs": "Epochs",
"bifrost.statPeers": "Peers",
"bifrost.noNetworks": "No networks discovered yet.",
"bifrost.noPlugins": "No plugins loaded.",
"bifrost.noEpochs": "No epochs recorded yet.",
"bifrost.justNow": "just now",
"bifrost.confirmEnable": "Enable Bifrost mode? WiFi will be put in monitor mode — network connection will be lost. Connect via USB/Bluetooth/Ethernet instead.",
"bifrost.monitorFailed": "Monitor Mode Failed",
"bifrost.monitorFailedHint": "For Broadcom chips (Pi Zero), install nexmon. Or use an external USB WiFi adapter.",
"bifrost.nexmonRequired": "Nexmon Required",
"bifrost.nexmonRequiredDesc": "Your Broadcom WiFi chip needs nexmon firmware patches for monitor mode. Click below to auto-install (takes ~15-25 min on Pi Zero 2 W).",
"bifrost.nexmonInstallBtn": "Install Nexmon",
"bifrost.nexmonConfirm": "Install nexmon firmware patches? This will download and compile nexmon from source (~15-25 min). Requires internet access and root privileges.",
"bifrost.nexmonStarted": "Nexmon installation started ...",
"bifrost.nexmonInstalling": "Installing Nexmon ...",
"nav.loki": "Loki",
"loki.title": "Loki — HID Attack Suite",
"loki.enable": "Enable",
"loki.enabled_msg": "Loki mode enabled",
"loki.disabled_msg": "Loki mode disabled",
"loki.status_label": "Status",
"loki.gadget_label": "Gadget",
"loki.layout_label": "Layout",
"loki.jobs_label": "Jobs",
"loki.running": "Running",
"loki.running_lc": "running",
"loki.idle": "Idle",
"loki.ready": "Ready",
"loki.not_ready": "Not Ready",
"loki.not_installed": "Not Installed",
"loki.install_msg": "HID gadget not installed. Install it and reboot to enable Loki.",
"loki.install_btn": "Install HID Gadget & Reboot",
"loki.reboot_confirm": "HID gadget installed. Reboot now to activate?",
"loki.run": "Run",
"loki.save": "Save",
"loki.new": "New",
"loki.delete": "Delete",
"loki.cancel": "Cancel",
"loki.output": "Output",
"loki.payloads": "Payloads",
"loki.custom_scripts": "Custom Scripts",
"loki.jobs": "Jobs",
"loki.clear_completed": "Clear Completed",
"loki.script": "Script",
"loki.status_col": "Status",
"loki.started": "Started",
"loki.actions": "Actions",
"loki.no_payloads": "No built-in payloads",
"loki.no_scripts": "No saved scripts",
"loki.no_jobs": "No jobs yet",
"loki.no_output": "No output",
"loki.empty_script": "Script is empty",
"loki.job_started": "Job started: {id}",
"loki.run_error": "Failed to run script",
"loki.script_name_prompt": "Script name:",
"loki.saved": "Script saved",
"loki.save_error": "Failed to save script",
"loki.confirm_delete": "Delete script '{name}'?",
"loki.quick_placeholder": "Quick type text here...",
"loki.quick_send": "Type",
"loki.quick_sent": "Text sent to target",
"loki.quick_error": "Failed to send text"
}