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

@@ -40,22 +40,40 @@
"settings.errorRestoring": "恢复默认值时出错",
"theme.group.colors": "颜色",
"theme.group.surfaces": "界面",
"theme.group.borders": "边框",
"theme.group.controls": "控件",
"theme.group.layout": "布局",
"theme.token.bg": "背景",
"theme.token.bg2": "备选背景",
"theme.token.ink": "文字颜色",
"theme.token.muted": "弱化文字",
"theme.token.accent1": "强调色 1 (酸性)",
"theme.token.accent2": "强调色 2 (青色)",
"theme.token.accent": "强调色",
"theme.token.accentAlt": "备选强调色",
"theme.token.danger": "危险",
"theme.token.warning": "警告",
"theme.token.ok": "成功",
"theme.token.panel": "面板",
"theme.token.panel2": "备选面板",
"theme.token.ctrlPanel": "控制面板",
"theme.token.ctrlPanel2": "备选控制面板",
"theme.token.btnBg": "按钮背景",
"theme.token.border": "边框",
"theme.token.borderStrong": "加粗边框",
"theme.token.borderHi": "高亮边框",
"theme.token.switchTrack": "开关轨道",
"theme.token.switchOnBg": "开关开启背景",
"theme.token.scrollTrack": "滚动条轨道",
"theme.token.scrollThumb": "滚动条滑块",
"theme.token.glass": "玻璃覆盖层",
"theme.token.radius": "圆角",
"theme.advanced": "高级 CSS",
"theme.applyRaw": "应用",
"theme.reset": "重置",
"theme.reset": "恢复默认",
"theme.export": "导出主题",
"theme.import": "导入主题",
"theme.importError": "无效的主题文件",
"dash.title": "仪表盘",
"dash.battery": "电池",
"dash.internet": "互联网",
@@ -777,5 +795,137 @@
"api.timeout": "请求超时",
"api.failed": "请求失败",
"router.notFound": "页面未找到:{{path}}",
"router.errorLoading": "加载页面时出错:{{message}}"
"router.errorLoading": "加载页面时出错:{{message}}",
"nav.sentinel": "Sentinel",
"sentinel.title": "Sentinel 守护犬",
"sentinel.enabled": "已启用",
"sentinel.disabled": "已禁用",
"sentinel.eventFeed": "事件动态",
"sentinel.ackAll": "全部确认",
"sentinel.clearAll": "全部清除",
"sentinel.allAcked": "所有事件已确认",
"sentinel.confirmClear": "清除所有事件?此操作不可逆。",
"sentinel.eventsCleared": "事件已清除",
"sentinel.noEvents": "暂无事件。Sentinel 正在监控您的网络以发现异常。",
"sentinel.rules": "规则",
"sentinel.devices": "设备",
"sentinel.notifiers": "通知器",
"sentinel.statDevices": "已知设备",
"sentinel.statAlive": "在线",
"sentinel.statUnread": "未读",
"sentinel.statEvents": "事件总数",
"sentinel.statRules": "活跃规则",
"sentinel.addRule": "添加规则",
"sentinel.noRules": "未配置规则。",
"sentinel.ruleLogic": "逻辑",
"sentinel.ruleActions": "动作",
"sentinel.enable": "启用",
"sentinel.disable": "禁用",
"sentinel.editRule": "编辑规则",
"sentinel.deleteRule": "删除规则",
"sentinel.confirmDeleteRule": "确定删除此规则?",
"sentinel.ruleDeleted": "规则已删除",
"sentinel.ruleUpdated": "规则已更新",
"sentinel.ruleCreated": "规则已创建",
"sentinel.ruleName": "规则名称",
"sentinel.triggerType": "触发类型",
"sentinel.cooldown": "冷却时间",
"sentinel.conditions": "条件",
"sentinel.cancel": "取消",
"sentinel.save": "保存",
"sentinel.nameRequired": "规则名称为必填项",
"sentinel.noDevices": "尚未发现设备。",
"sentinel.trusted": "受信任",
"sentinel.untrusted": "不受信任",
"sentinel.alias": "别名",
"sentinel.expectedIps": "预期 IP",
"sentinel.lastSeen": "最后上线",
"sentinel.deviceSaved": "设备已更新",
"sentinel.discordWebhook": "Discord Webhook",
"sentinel.webhookUrl": "Webhook URL",
"sentinel.smtpHost": "SMTP Host",
"sentinel.smtpPort": "SMTP Port",
"sentinel.smtpUser": "SMTP 用户",
"sentinel.smtpPass": "SMTP 密码",
"sentinel.emailFrom": "发件人邮箱",
"sentinel.emailTo": "收件人邮箱",
"sentinel.saveNotifiers": "保存通知器",
"sentinel.notifiersSaved": "通知器配置已保存",
"sentinel.justNow": "刚刚",
"sentinel.acknowledge": "确认",
"nav.bifrost": "彩虹桥",
"bifrost.title": "彩虹桥",
"bifrost.enabled": "已启用",
"bifrost.disabled": "已禁用",
"bifrost.activityFeed": "活动日志",
"bifrost.clearActivity": "清除",
"bifrost.activityCleared": "活动已清除",
"bifrost.noActivity": "暂无活动。启用 Bifrost 开始 WiFi 侦察。",
"bifrost.networks": "网络",
"bifrost.plugins": "插件",
"bifrost.history": "历史",
"bifrost.mood": "心情",
"bifrost.statNetworks": "网络",
"bifrost.statHandshakes": "握手",
"bifrost.statDeauths": "去认证",
"bifrost.statAssocs": "关联",
"bifrost.statEpochs": "纪元",
"bifrost.statPeers": "节点",
"bifrost.noNetworks": "尚未发现网络。",
"bifrost.noPlugins": "未加载插件。",
"bifrost.noEpochs": "尚无纪元记录。",
"bifrost.justNow": "刚刚",
"bifrost.confirmEnable": "启用 Bifrost 模式WiFi 将切换为监听模式 — 网络连接将断开。请通过 USB/蓝牙/以太网连接。",
"bifrost.monitorFailed": "监控模式失败",
"bifrost.monitorFailedHint": "对于Broadcom芯片(Pi Zero)请安装nexmon。或使用外置USB WiFi适配器。",
"bifrost.nexmonRequired": "需要安装 Nexmon",
"bifrost.nexmonRequiredDesc": "您的Broadcom WiFi芯片需要nexmon固件补丁才能使用监控模式。点击自动安装Pi Zero 2 W约需15-25分钟。",
"bifrost.nexmonInstallBtn": "安装 Nexmon",
"bifrost.nexmonConfirm": "安装nexmon固件补丁这将下载并编译nexmon约15-25分钟。需要网络连接和root权限。",
"bifrost.nexmonStarted": "nexmon 安装已开始 ...",
"bifrost.nexmonInstalling": "正在安装 Nexmon ...",
"nav.loki": "Loki",
"loki.title": "Loki — HID 攻击套件",
"loki.enable": "启用",
"loki.enabled_msg": "Loki 模式已启用",
"loki.disabled_msg": "Loki 模式已禁用",
"loki.status_label": "状态",
"loki.gadget_label": "设备",
"loki.layout_label": "布局",
"loki.jobs_label": "任务",
"loki.running": "运行中",
"loki.running_lc": "运行中",
"loki.idle": "空闲",
"loki.ready": "就绪",
"loki.not_ready": "未就绪",
"loki.run": "运行",
"loki.save": "保存",
"loki.new": "新建",
"loki.delete": "删除",
"loki.cancel": "取消",
"loki.output": "输出",
"loki.payloads": "有效载荷",
"loki.custom_scripts": "自定义脚本",
"loki.jobs": "任务",
"loki.clear_completed": "清除已完成",
"loki.script": "脚本",
"loki.status_col": "状态",
"loki.started": "已启动",
"loki.actions": "操作",
"loki.no_payloads": "无内置有效载荷",
"loki.no_scripts": "无已保存脚本",
"loki.no_jobs": "暂无任务",
"loki.no_output": "无输出",
"loki.empty_script": "脚本为空",
"loki.job_started": "任务已启动:{id}",
"loki.run_error": "运行脚本失败",
"loki.script_name_prompt": "脚本名称:",
"loki.saved": "脚本已保存",
"loki.save_error": "保存脚本失败",
"loki.confirm_delete": "删除脚本 '{name}'",
"loki.quick_placeholder": "在此输入快速文本...",
"loki.quick_send": "输入",
"loki.quick_sent": "文本已发送至目标",
"loki.quick_error": "发送文本失败"
}