diff --git a/public/.well-known/security.txt b/public/.well-known/security.txt
index c0c94938..c8eeb3b5 100644
--- a/public/.well-known/security.txt
+++ b/public/.well-known/security.txt
@@ -1,6 +1,5 @@
Contact: mailto:security@darknode.ai
-Contact: https://darknode.ai/contact
Expires: 2027-10-31T23:59:59.000Z
Preferred-Languages: en
Canonical: https://darknode.ai/.well-known/security.txt
-Policy: https://darknode.ai/contact
+Policy: https://darknode.ai/acceptable-use#report-security
diff --git a/public/css/console.css b/public/css/console.css
index 4627a381..b277c37a 100644
--- a/public/css/console.css
+++ b/public/css/console.css
@@ -189,6 +189,8 @@ body.app .svc-menu .svc-card .side-item.active{color:var(--txt)!important;font-w
.mt-in{width:100%;background:var(--bg,var(--card2));border:1px solid var(--line);border-radius:9px;color:var(--txt);font:inherit;font-size:.9rem;padding:9px 11px;outline:none;box-sizing:border-box}
.mt-field-row .mt-in{flex:1;min-width:120px;width:auto}
.mt-field-row .mt-sel,.mt-field-row input[type=number].mt-in{flex:0 1 auto;max-width:100%}
+.mt-hint{flex-basis:100%;font-size:.75rem;line-height:1.45;color:var(--mut);white-space:normal;overflow-wrap:anywhere}
+@media(max-width:560px){.mt-field-row .mt-lbl{flex-basis:100%}}
.mt-in:focus{border-color:var(--acc);box-shadow:0 0 0 1px color-mix(in srgb,var(--acc) 45%,transparent)}
.mt-ta{min-height:120px;resize:vertical;font-family:var(--font-mono,ui-monospace,monospace);font-size:.85rem;line-height:1.5}
.mt-sel{cursor:pointer}
diff --git a/public/css/landing-polish.css b/public/css/landing-polish.css
index 63ed9997..8d1d9417 100644
--- a/public/css/landing-polish.css
+++ b/public/css/landing-polish.css
@@ -95,3 +95,7 @@ html body.landing #nav-start { display: inline-flex !important; align-items: cen
html body.landing #nav-signin,
html body.landing #nav-start { height: 36px !important; }
}
+/* "Page not found" for a path that is neither a public page nor an app page */
+html body.landing .dn-notfound .wrap { max-width: 640px; margin: 0 auto; padding: 14vh 24px 16vh; box-sizing: border-box; }
+html body.landing .dn-notfound h1 { font-size: 2rem; margin: 0 0 12px; color: rgb(15, 23, 42); }
+html body.landing .dn-notfound p { margin: 0 0 24px; color: rgb(63, 63, 70); line-height: 1.6; overflow-wrap: anywhere; }
diff --git a/public/css/styles.css b/public/css/styles.css
index 7daa0f52..bd92c54e 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -211,7 +211,7 @@ body.landing #view{max-width:none;padding:0;margin:0}
.os-ed-sz{margin-left:auto;font-size:.66rem;font-weight:700;letter-spacing:.06em;color:var(--mut);font-variant-numeric:tabular-nums}
.os-ed-tag{font-size:.56rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--bg);background:var(--acc);border-radius:999px;padding:2px 7px}
.os-ed-d{font-size:.76rem;line-height:1.5;margin:0;flex:1}
-.os-ed .dlapp-cmd code{font-size:.68rem;padding:7px 8px;white-space:pre;overflow-x:auto;word-break:normal}
+.os-ed .dlapp-cmd code{font-size:.68rem;padding:7px 8px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;cursor:copy}
.dlapp-card{display:block;text-align:center;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:22px 16px;text-decoration:none;color:var(--txt)}
.dlapp-card:hover{border-color:var(--acc);transform:translateY(-2px)}
.dlapp-os{font-weight:800;font-size:1.05rem}
diff --git a/public/js/address-intel.js b/public/js/address-intel.js
index 96a8df11..2e449351 100644
--- a/public/js/address-intel.js
+++ b/public/js/address-intel.js
@@ -3,6 +3,7 @@
// Parallel lookups against GreyNoise, AbuseIPDB, Shodan, VirusTotal, crt.sh, DNS, plus
// saved IPsum / ThreatFox / URLhaus snapshot files (not live queries), community reports,
// a hosting-ASN tag, "My IP" and a bulk IP check.
+import { dnFetchJSON } from "/js/net.js";
var esc = function(s) {
return String(s == null ? "" : s).replace(/[&<>"']/g, function(c) {
@@ -263,7 +264,8 @@ function fetchDNSRecords(domain, type) {
}
function fetchCertTransparency(domain) {
- return fetchJSON("https://crt.sh/?q=" + encodeURIComponent(domain) + "&output=json");
+ // crt.sh sends no CORS headers, so it is fetched through the Darknode edge proxy
+ return dnFetchJSON("https://crt.sh/?q=" + encodeURIComponent(domain) + "&output=json", { timeout: 25000, max: 2000000 });
}
// Hosting / datacenter networks by ASN. Being on this list is CONTEXT, not a verdict:
@@ -541,6 +543,8 @@ function renderNetworkPanel(data, shodan, reverseDNS) {
return html;
}
+var IP_ONLY_NA = "IP-only source, not applicable to domains. Investigate the domain's IP address to check it here.";
+
function renderReputationPanel(results) {
var html = '
';
@@ -560,6 +564,8 @@ function renderReputationPanel(results) {
'
';
} else if (results.greynoise_err) {
html += panelUnavailable(results.greynoise_err);
+ } else if (results.ip_only_na) {
+ html += panelUnavailable(IP_ONLY_NA);
} else {
html += panelLoading();
}
@@ -583,6 +589,8 @@ function renderReputationPanel(results) {
html += panelUnavailable(results.abuseipdb_err);
} else if (results.abuseipdb_nokey) {
html += panelNeedsKey("AbuseIPDB");
+ } else if (results.ip_only_na) {
+ html += panelUnavailable(IP_ONLY_NA);
} else {
html += panelLoading();
}
@@ -902,6 +910,8 @@ function runInvestigation(input, type, container) {
}
var keys = getApiKeys();
+ // GreyNoise and AbuseIPDB look up IP addresses only, so a domain or URL never queries them.
+ if (!ip) results.ip_only_na = true;
// Build panels structure
var panelOrder = [];
diff --git a/public/js/api-fuzzer.js b/public/js/api-fuzzer.js
index 6184b3d9..461ce72e 100644
--- a/public/js/api-fuzzer.js
+++ b/public/js/api-fuzzer.js
@@ -180,7 +180,7 @@ export function renderAPIFuzzer(container) {
tab: 'builder',
method: 'GET',
url: '',
- headers: [{ key: 'Content-Type', val: 'application/json' }, { key: 'Authorization', val: '' }],
+ headers: [{ key: 'Content-Type', val: 'application/json' }],
bodyType: 'json',
body: '',
fuzzTarget: 'param',
diff --git a/public/js/auth.js b/public/js/auth.js
index 3c951246..da8c0f78 100644
--- a/public/js/auth.js
+++ b/public/js/auth.js
@@ -34,7 +34,8 @@ import "/js/net.js?v=20261011a";
import "/js/scroll-top.js?v=20260926a";
import "/js/shortcuts.js";
import "/js/mobile-nav.js";
-import { consoleHTML, directoryHTML, wireConsole, labelOf as navLabel, groupOf as navGroup, recentSecs as navRecent, favSecs as navFavs, RETIRED } from "/js/console-nav.js?v=20261029d";
+import { consoleHTML, directoryHTML, wireConsole, labelOf as navLabel, groupOf as navGroup, recentSecs as navRecent, favSecs as navFavs, RETIRED, NAV as CONSOLE_NAV } from "/js/console-nav.js?v=20261029d";
+import { isAppPath } from "/js/deck/routes.js?v=1";
// Only the tool count is needed here; the manifest carries ids/names/categories without the
// tool code (js/tools/*), which loads when the Toolbox opens.
import { TOOL_META as _MINI_TOOLS } from "/js/tools-manifest.js?v=20261006a";
@@ -727,8 +728,17 @@ function showLanding() {
loadLanding().then(m => m.renderLanding(view, {
onGetStarted: () => renderAuth("signup"),
onSignIn: () => renderAuth("signin"),
+ isAppPath: (p) => isAppPath(p, appSecs()),
}));
}
+// Every section/tool id the signed-in app routes, from the routers' own registries: the console
+// catalog (with mini-tools and retired ids, whose old links still route) and the tool blurbs,
+// which list the Deck's own tools. The landing shows "Page not found" for anything else.
+let _appSecs = null;
+function appSecs() {
+ if (!_appSecs) _appSecs = new Set([...CONSOLE_NAV.flatMap((g) => g.items.map((i) => i.sec)), ...RETIRED, ...Object.keys(SIDE_DESC)]);
+ return _appSecs;
+}
// ---------- Google Identity Services: in-page FedCM / One Tap bubble ----------
// Shows the native "Sign in to darknode.ai with google.com" chooser inside the page
@@ -1813,7 +1823,18 @@ function renderApp(user) {
+ 'html[data-embed] body.app.dn-embed :is(.btn:not(.ghost,.danger,.github),button[style*="background:#00aaff"],button[style*="background:#00d4ff"]):not(#dn-x):not(#dn-y):not(#dn-z){color:#fff!important}'
// (three id-not()s outrank aws.css, which pins its skin with two)
// let the Deck's own page tone show through behind every tool (ink or cyber)
- + 'html[data-embed] body.app.dn-embed:not(#dn-x):not(#dn-y):not(#dn-z),html[data-embed] body.app.dn-embed :is(#app,#view,.app-shell,.app-main):not(#dn-x):not(#dn-y):not(#dn-z){background:transparent!important}';
+ + 'html[data-embed] body.app.dn-embed:not(#dn-x):not(#dn-y):not(#dn-z),html[data-embed] body.app.dn-embed :is(#app,#view,.app-shell,.app-main):not(#dn-x):not(#dn-y):not(#dn-z){background:transparent!important}'
+ // the Deck inverts this frame, so the pro theme's hard-coded dark code panels would land
+ // light (and each inner code chip black): give them light values that invert to dark ink
+ + 'body.dn-embed :is(.dl-cmd,.api-code-block,pre.code-block):not(#dn-x){background:#ecebe7!important;color:#1f1e1c!important;border:1px solid #d6d4cf!important}'
+ + 'body.dn-embed :is(.dl-cmd,.api-code-block,pre.code-block) :is(code,.mono,pre):not(#dn-x){background:transparent!important;color:inherit!important;padding:0;border-radius:0}'
+ + 'body.dn-embed .api-code-block pre:not(#dn-x){padding:14px 16px}'
+ + 'body.dn-embed .api-code-header:not(#dn-x){background:#e2e0db!important;color:#5d5a55!important;border-bottom:1px solid #d6d4cf!important}'
+ + 'body.dn-embed :is(.api-code-copy,.code-block .cb-copy):not(#dn-x){background:#fff!important;color:#3f3d3a!important;border:1px solid #d6d4cf!important}'
+ + 'body.dn-embed pre.code-block.cta-cmd:not(#dn-x){padding-right:72px!important}'
+ + 'body.dn-embed .dl-cmd .stat-l:not(#dn-x){color:#6a6762!important}'
+ // a dark scrim inverts to light grey; a light one inverts to the Deck's dark scrim
+ + 'body.dn-embed .dn-modal-ov:not(#dn-x){background:rgba(245,244,241,.6)!important}';
document.head.appendChild(st);
const fl = document.createElement("link"); fl.rel = "stylesheet"; fl.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500&display=swap"; document.head.appendChild(fl);
}
diff --git a/public/js/cookie-inspector.js b/public/js/cookie-inspector.js
index ab42c086..0bfd8827 100644
--- a/public/js/cookie-inspector.js
+++ b/public/js/cookie-inspector.js
@@ -474,8 +474,8 @@ function exampleText() {
// ── render ──
export function renderCookieInspector(main) {
- function toast(msg) {
- if (typeof window.showToast === "function") window.showToast(msg);
+ function toast(msg, type) {
+ if (typeof window.showToast === "function") window.showToast(msg, type);
}
main.innerHTML = CK_CSS +
@@ -637,9 +637,9 @@ export function renderCookieInspector(main) {
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(lastReport).then(
function () { toast("Report copied to clipboard"); },
- function () { toast("Copy failed — select the text manually"); });
+ function () { toast("Copy failed — select the text manually", "error"); });
} else {
- toast("Clipboard unavailable — select the text manually");
+ toast("Clipboard unavailable — select the text manually", "error");
}
};
}
diff --git a/public/js/cors-tester.js b/public/js/cors-tester.js
index 00d436f6..065153d4 100644
--- a/public/js/cors-tester.js
+++ b/public/js/cors-tester.js
@@ -15,7 +15,7 @@ export function renderCorsTester(container) {
h += '
';
h += '
';
- h += '';
+ h += '';
h += '';
h += '
';
diff --git a/public/js/darknet-radar.js b/public/js/darknet-radar.js
index 172606ea..227bff49 100644
--- a/public/js/darknet-radar.js
+++ b/public/js/darknet-radar.js
@@ -65,7 +65,7 @@ function _drRenderVictims(list) {
if (v.group) h += '' + esc(v.group) + '';
h += '
';
h += '
';
- if (v.activity) h += '
Sector: ' + esc(v.activity) + '
';
+ if (v.activity && !/^(not found|n\/a|unknown)$/i.test(String(v.activity).trim())) h += '
Sector: ' + esc(v.activity) + '
';
if (v.country) h += '
Country: ' + esc(v.country) + '
';
if (v.attackdate) h += '
Attack: ' + esc(_drFmtDate(v.attackdate)) + '
';
if (v.discovered) h += '
Discovered: ' + esc(_drFmtDate(v.discovered)) + '
';
@@ -141,7 +141,7 @@ async function _drLoadTab(key) {
panel.innerHTML = _drLoading();
try {
if (key === 'victims') st.data = await dnFetchJSON(RANSOM_VICTIMS_URL, { timeout: 25000 });
- else if (key === 'groups') st.data = await dnFetchJSON(RANSOM_GROUPS_URL, { timeout: 25000 });
+ else if (key === 'groups') st.data = await dnFetchJSON(RANSOM_GROUPS_URL, { timeout: 25000, max: 2000000 }); // the full groups feed is ~850 KB
else if (key === 'kev') { var d = await loadKevCatalog(); st.data = d.vulnerabilities; }
st.error = '';
} catch (err) {
diff --git a/public/js/dataprotect/phish-engine.js b/public/js/dataprotect/phish-engine.js
index 10271e94..1dbb4164 100644
--- a/public/js/dataprotect/phish-engine.js
+++ b/public/js/dataprotect/phish-engine.js
@@ -223,10 +223,22 @@ export function analyzeUrl(raw) {
// a brand's own address in the path or query (evil.example/https://paypal.com/) makes the link read as the brand's
if (!look.exact) { const inPath = BRANDS.find((b) => b.length >= 4 && new RegExp("(^|[^a-z0-9-])" + b + "\\.(com|net|org)\\b").test(decodeSafe(out.path).toLowerCase())); if (inPath) out.reasons.push({ w: 1, t: `The path mentions "${inPath}" but the link goes to "${reg}".` }); }
+ // open redirect: a redirect-style parameter that sends the visitor on to another site, so the
+ // link shows a trusted domain but lands somewhere else (?next=//evil.example, ?url=https://...)
+ for (const [k, v] of u.searchParams) {
+ if (!REDIRECT_PARAM.test(k)) continue;
+ const val = String(v).trim();
+ if (!/^([a-z][a-z0-9+.-]*:)?[/\\]{2}/i.test(val)) continue;
+ let dest = ""; try { dest = new URL(val.replace(/\\/g, "/"), u).hostname.toLowerCase(); } catch (_) { continue; }
+ // landing on a brand's own site is not where the danger is (a phishing page often sends the victim back there)
+ if (dest && registrableDomain(dest) !== reg && !lookalike(dest).exact) { out.reasons.push({ w: 2, t: `The "${k}" parameter forwards the visitor to ${dest}, a different site: an open-redirect pattern that borrows the first domain's trust.` }); break; }
+ }
+
out.severity = sevFromWeight(sumWeight(out.reasons));
out.lookalike = look;
return out;
}
+const REDIRECT_PARAM = /^(next|url|uri|redirect|redirect_?ur[il]|redir|return|return_?to|return_?url|returnurl|continue|dest|destination|goto|go|target|to|r|u|out|forward|rurl|link|callback_?url|success_?url)$/i;
function decodeSafe(s) { try { return decodeURIComponent(s || ""); } catch (_) { return String(s || ""); } }
function sumWeight(reasons) { return reasons.reduce((a, r) => a + r.w, 0); }
@@ -517,6 +529,8 @@ export function selfTest() {
T("impersonation flagged", a.lookalike.impersonation && a.severity !== "info");
const b = analyzeUrl("https://paypa1.com");
T("typosquat flagged", b.lookalike.near && b.lookalike.brand === "paypal");
+ T("open redirect flagged", analyzeUrl("https://example.com/login?next=//evil.example").reasons.some((r) => /open-redirect/.test(r.t)));
+ T("same-site redirect not flagged", !analyzeUrl("https://example.com/login?next=https://www.example.com/a").reasons.some((r) => /open-redirect/.test(r.t)));
const c = analyzeUrl("https://github.com/x/y");
T("benign url low", c.severity === "info" || c.severity === "low");
const d = analyzeUrl("http://user:pass@198.51.100.9/login");
diff --git a/public/js/deck-ui.js b/public/js/deck-ui.js
index cde6a25e..b412905b 100644
--- a/public/js/deck-ui.js
+++ b/public/js/deck-ui.js
@@ -57,6 +57,7 @@ import { remediationPlan, slaReport } from "/js/core/report-plans.js?v=20261028a
import { affectsMe, graphCves } from "/js/core/affects-me.js?v=20261028a";
import { roleFocus, ROLES as HOME_ROLES } from "/js/core/role-home.js?v=20261028a";
import { makeMessage as makeBridge, parseMessage as parseBridge, MSG as BMSG } from "/js/core/tool-bridge.js?v=20261018g";
+import { SCENES, SCENE_PATH } from "/js/deck/routes.js?v=1";
const LS_CONN = "dn_deck_connections_v1";
// AI providers whose key the AI Assistant (webai.js) uses, calling the provider directly from the browser.
@@ -1033,6 +1034,7 @@ const CSS = `
.dk-tsearch svg{width:17px;height:17px;color:#687388;flex:none}
.dk .dk-tsearch input{flex:1;min-width:0;width:auto;height:100%;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;outline:0;box-shadow:none!important;background:transparent!important;color:#1a2233;font:inherit;font-size:14px;-webkit-appearance:none;appearance:none}
.dk .dk-tsearch input::-webkit-search-decoration{-webkit-appearance:none}
+.dk .dk-tsearch input:focus-visible{outline:0!important;box-shadow:none!important}
@media(max-width:640px){.dk-tbar{padding:14px 16px 10px;gap:10px}.dk-tsearch{max-width:none}}
.dk-tbar{flex-wrap:wrap}.dk-tbar>.dk-ti-head{flex-basis:100%;margin-bottom:4px}
.dk-tbody{flex:1;display:flex;min-height:0}
@@ -1076,6 +1078,8 @@ const CSS = `
.dk-rtab th{text-align:left;padding:7px 10px;color:#6a7488;font-size:10.5px;letter-spacing:.05em;text-transform:uppercase;border-bottom:1px solid rgba(23,33,56,.1)}
.dk-rtab td{padding:8px 10px;border-bottom:1px solid rgba(23,33,56,.06);color:#38435c}
.dk-rtab tr:last-child td{border-bottom:0}
+.dk-rtab td:nth-child(n+2){overflow-wrap:normal;white-space:nowrap}
+@media(max-width:640px){.dk .dk-rtab :is(th,td){padding:8px 6px!important}}
.dk-cve .bd .ti{font-size:12.5px;color:#5a6680;margin-top:3px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dk-cve .bd .dt{font-size:11px;color:#6a7488;margin-top:5px}
.dk-loading{display:flex;align-items:center;gap:12px;color:#687388;font-size:13.5px;padding:30px 4px}
@@ -1707,6 +1711,10 @@ textarea.dk-kitio{min-height:120px}
.dk[data-ui=deck] .dk-brand .dk-wm{filter:brightness(0)}
.dk[data-ui=deck] .dk-scene *{box-shadow:none!important}
.dk[data-ui=deck] .dk-wframe iframe{filter:brightness(.92)}
+/* toasts sit outside the invert layer, so they take the ink tones directly */
+body:has(.dk[data-ui=deck]) .toast-item{background:#262522!important;color:#ece9e4!important;border:1px solid #3a3935!important;border-left:4px solid var(--toast-c)!important;box-shadow:0 8px 24px rgba(0,0,0,.4)!important}
+body:has(.dk[data-ui=deck]) .toast-x{color:#9a968f!important}
+body:has(.dk[data-ui=deck]) .toast-x:hover{color:#fff!important}
.dk[data-ui=deck] .dk-wbar{background:var(--dk-bg)}
.dk[data-ui=deck] :is(.dk-gcard,.dk-intcard,.dk-act,.dk-qacard){background:var(--dk-surf)}
.dk[data-ui=deck] .dk-spot{background:rgba(0,0,0,.55)}
@@ -2078,7 +2086,7 @@ export function renderDeck(host, opts) {
function drawStars(){}
// ---------- workspace router ----------
- const SCENES = { overview: "#dkOverview", surface: "#dkSurface", threat: "#dkThreat", cloud: "#dkCloud", compliance: "#dkCompliance", invest: "#dkInvest", findings: "#dkFindings", inventory: "#dkInventory", correlations: "#dkCorrelations", monitors: "#dkMonitors", apikeys: "#dkApiKeys", device: "#dkDevice", audit: "#dkAudit", section: "#dkSection", con: "#dkCon", tools: "#dkTools", toolkit: "#dkToolkit", activity: "#dkActivity", assistant: "#dkAssistant", plans: "#dkPlans", settings: "#dkSettings", reports: "#dkReports", team: "#dkTeam", personal: "#dkPersonal", enterprise: "#dkEnterprise" };
+ // SCENES (scene id -> element) and SCENE_PATH live in deck/routes.js, shared with the signed-out 404 check
const sceneEls = {}; for (const k in SCENES) sceneEls[k] = $(SCENES[k]);
const sceneTools = sceneEls.tools; // kept for the tools gallery code
// sec -> label, for activity lines and quick-action titles
@@ -2110,7 +2118,6 @@ export function renderDeck(host, opts) {
// an open tool is /, a page is / (the overview is /, a section is
// /area/, a Personal/Organization tab is /personal/). compliance and tools are also tool ids, so those pages take another
// name. Navigating adds a history entry; boot and back/forward only replace it.
- const SCENE_PATH = { overview: "", compliance: "compliance-center", tools: "all-tools", con: "connections", invest: "investigations" };
const scenePath = (scene, sect) => "/" + (scene === "section" ? "area/" + sect : scene in SCENE_PATH ? SCENE_PATH[scene] : scene);
// -> { scene, arg } for a Deck page path, null for anything else (a tool)
function routeOf(pathname){
@@ -2120,6 +2127,7 @@ export function renderDeck(host, opts) {
if (m) return isSect(m[1]) ? { scene: "section", arg: m[1] } : null;
const sp = raw.match(/^(personal|enterprise)\/([\w-]+)$/);
if (sp) return { scene: sp[1], arg: { tab: sp[2] } };
+ if (raw === "overview") return { scene: "overview" }; // the weekly digest links /overview
for (const k in SCENES) if (k !== "section" && (k in SCENE_PATH ? SCENE_PATH[k] : k) === raw) return { scene: k };
return null;
}
@@ -2530,18 +2538,24 @@ export function renderDeck(host, opts) {
search.oninput = () => { toolQ = search.value.trim().toLowerCase(); applyTools(); revealGallery(); };
}
function applyTools(){
- const q = toolQ; let shown = 0;
- sceneTools.querySelectorAll("#dkToolNav .dk-tcat").forEach((b) => b.classList.toggle("on", !q && b.dataset.cat === toolCat));
+ const q = toolQ; let shown = 0; const hits = {};
sceneTools.querySelectorAll(".dk-tsec").forEach((sec) => {
const inCat = !!q || toolCat === "all" || sec.dataset.g === toolCat;
let any = false;
sec.querySelectorAll(".dk-gcard").forEach((c) => {
const hit = inCat && (!q || q.split(/\s+/).every((w) => c.dataset.txt.includes(w)));
c.style.display = hit ? "" : "none";
- if (hit) { any = true; shown++; }
+ if (hit) { any = true; shown++; hits[sec.dataset.g] = (hits[sec.dataset.g] || 0) + 1; }
});
sec.hidden = !any;
});
+ // While searching, each category shows how many of its tools match.
+ sceneTools.querySelectorAll("#dkToolNav .dk-tcat").forEach((b) => {
+ b.classList.toggle("on", !q && b.dataset.cat === toolCat);
+ const n = b.querySelector(".n"); if (!n) return;
+ if (!n.dataset.total) n.dataset.total = n.textContent;
+ n.textContent = !q ? n.dataset.total : (b.dataset.cat === "all" ? shown : (hits[b.dataset.cat] || 0)).toLocaleString();
+ });
const countEl = sceneTools.querySelector("#dkToolCount");
if (countEl) countEl.textContent = q ? `${shown} match${shown === 1 ? "" : "es"}` : `${shown} tool${shown === 1 ? "" : "s"}`;
const none = sceneTools.querySelector("#dkToolNone"); if (none) none.hidden = shown > 0;
diff --git a/public/js/deck/routes.js b/public/js/deck/routes.js
new file mode 100644
index 00000000..538659a1
--- /dev/null
+++ b/public/js/deck/routes.js
@@ -0,0 +1,26 @@
+// Copyright (c) 2026 Darknode-Official. All rights reserved. See LICENSE.
+// The Deck's page table: every scene and the darknode.ai path it lives at. deck-ui.js routes
+// with it, and the signed-out site uses it to tell a real page link (which shows the landing,
+// then opens that page after sign-in) from a mistyped one (which shows "Page not found").
+// Pure data and logic, no imports, so the landing can load it without the Deck.
+
+// scene id -> its element in the Deck
+export const SCENES = { overview: "#dkOverview", surface: "#dkSurface", threat: "#dkThreat", cloud: "#dkCloud", compliance: "#dkCompliance", invest: "#dkInvest", findings: "#dkFindings", inventory: "#dkInventory", correlations: "#dkCorrelations", monitors: "#dkMonitors", apikeys: "#dkApiKeys", device: "#dkDevice", audit: "#dkAudit", section: "#dkSection", con: "#dkCon", tools: "#dkTools", toolkit: "#dkToolkit", activity: "#dkActivity", assistant: "#dkAssistant", plans: "#dkPlans", settings: "#dkSettings", reports: "#dkReports", team: "#dkTeam", personal: "#dkPersonal", enterprise: "#dkEnterprise" };
+// Every Deck page has a darknode.ai link: a page is / (the overview is /, a section is
+// /area/, a Personal/Organization tab is /personal/). compliance and tools are also
+// tool ids, so those pages take another name.
+export const SCENE_PATH = { overview: "", compliance: "compliance-center", tools: "all-tools", con: "connections", invest: "investigations" };
+
+// Does the signed-in app open this path? `secs` is every section/tool id the app routes
+// (the console catalog, retired ids and the Deck's own tools). Mirrors the routers: an old
+// /console/ link opens ; hyphenated paths are camelCase secs except tool-.
+export function isAppPath(pathname, secs) {
+ let raw = String(pathname || "").replace(/^\/+|\/+$/g, "");
+ if (raw === "console" || raw.startsWith("console/")) raw = raw.slice(7).replace(/^\/+/, "");
+ if (!raw || raw === "index.html") return true;
+ if (/^(area|personal|enterprise)\/[\w-]+$/.test(raw)) return true;
+ for (const k in SCENES) if (k !== "section" && (k === raw || SCENE_PATH[k] === raw)) return true;
+ if (raw.includes("/")) return false;
+ const sec = raw.startsWith("tool-") ? raw : raw.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
+ return !!secs && secs.has(sec);
+}
diff --git a/public/js/docs.js b/public/js/docs.js
index 990e3cbd..8b6ee27f 100644
--- a/public/js/docs.js
+++ b/public/js/docs.js
@@ -167,7 +167,9 @@ node darknode.js nexus init # optional: scaffold .nexus/ project
Develop or distribute malware for malicious use, conduct denial-of-service attacks, or target individuals.
Exfiltrate data, evade detection for unlawful purposes, or violate any law or third-party rights.
-
Darknode is intended for authorized penetration testing, CTFs, security research and defense. Misuse is your responsibility.
`;
+
Darknode is intended for authorized penetration testing, CTFs, security research and defense. Misuse is your responsibility. The full list of prohibited activities is in Section 11 of the Terms of Service, which governs if the two differ.
+
Reporting a security issue in Darknode
+
Email security@darknode.ai with the details and the steps to reproduce. Please do not open a public issue or share the details until it is fixed.
`;
case 'license': return `
The Darknode suite is proprietary — all rights reserved by the author. No license to use, copy, modify, or distribute is granted. The software is provided "as is", without warranty of any kind.
`;
diff --git a/public/js/email-auth.js b/public/js/email-auth.js
index 43692513..5b3689cd 100644
--- a/public/js/email-auth.js
+++ b/public/js/email-auth.js
@@ -28,7 +28,7 @@ var C_FAIL = "var(--bad)";
// random per-domain tokens, so it can only be found with a selector you enter.
var DEFAULT_SELECTORS = ["default", "google", "selector1", "selector2", "k1", "k2", "k3", "dkim", "s1", "s2", "mail", "smtp",
"resend", "mandrill", "protonmail", "protonmail2", "fm1", "fm2", "sig1", "zmail", "mailjet", "pm"];
-var EXAMPLE_DOMAINS = ["google.com", "github.com", "paypal.com", "microsoft.com"];
+var EXAMPLE_DOMAINS = ["example.com", "example.org"];
function toast(msg) {
if (typeof window.showToast === "function") window.showToast(msg);
diff --git a/public/js/getapp.js b/public/js/getapp.js
index a547b5ac..e918e2d4 100644
--- a/public/js/getapp.js
+++ b/public/js/getapp.js
@@ -97,17 +97,17 @@ export function renderDownloads(main) {
netinstall~12 GB
Just a terminal — no desktop, no UI. Core CLI security stack + Nexus AI agent + local models. Boots straight to a console. Smallest & fastest.
Full branded XFCE desktop + Nexus + the CLI toolset — minus Metasploit, SecLists, Docker and the cockpit app. A lean graphical workstation.
-
./build.sh debian slim && ./export-vbox.sh slim
+
./build.sh debian slim && ./export-vbox.sh slim
full~30 GBeverything
The complete workstation: desktop, cockpit app, Metasploit, SecLists, Exploit-DB, Docker, autonomous AI recon, honeypot — 80+ heavyweight tools pre-installed, on top of the full Darknode CLI.
-
./build.sh debian full && ./export-vbox.sh full
+
./build.sh debian full && ./export-vbox.sh full
diff --git a/public/js/incident-cost.js b/public/js/incident-cost.js
index b1831b72..69f328e9 100644
--- a/public/js/incident-cost.js
+++ b/public/js/incident-cost.js
@@ -511,7 +511,7 @@ export function renderIncidentCost(container) {
var state = {
sectorId: 'healthcare',
vectorId: 'phishing',
- records: 50000,
+ records: 0, // not entered yet: no estimate until the user gives a record count
dataTypes: ['pii'],
mtti: 204,
mttc: 73,
@@ -520,7 +520,7 @@ export function renderIncidentCost(container) {
lawEnforcement: false,
amplifiers: [],
mitigators: [],
- revenue: 500000000,
+ revenue: 0,
gdprApplicable: false,
insuranceTier: 2,
activeTab: 'calculator',
@@ -554,6 +554,8 @@ export function renderIncidentCost(container) {
if (state.activeTab === 'calculator') {
h += renderCalculator(costs);
+ } else if (!state.records && state.activeTab !== 'response') {
+ h += '
Enter the number of records compromised in the Cost calculator tab to see this analysis.
';
} else if (state.activeTab === 'regulatory') {
h += renderRegulatory(costs);
} else if (state.activeTab === 'insurance') {
@@ -575,6 +577,12 @@ export function renderIncidentCost(container) {
var h = '';
// Hero cost display
+ if (!state.records) {
+ h += '
';
+ h += '
Estimated total breach cost
';
+ h += '
Enter the number of records compromised to see an estimate.
';
+ h += '
';
+ } else {
h += '
';
h += '
Estimated total breach cost
';
h += '
' + fmt$(costs.total) + '
';
@@ -603,6 +611,7 @@ export function renderIncidentCost(container) {
h += '
';
}
h += '
';
+ } // records entered
// Main grid: form + breakdown
h += '
';
@@ -634,8 +643,7 @@ export function renderIncidentCost(container) {
h += '
';
h += '';
h += '
';
- h += '';
- h += '' + fmtN(state.records) + '';
+ h += '';
h += '
';
// Data types
@@ -670,7 +678,7 @@ export function renderIncidentCost(container) {
// Revenue (for GDPR)
h += '
';
h += '';
- h += '';
+ h += '';
h += '
';
// GDPR toggle
@@ -711,6 +719,7 @@ export function renderIncidentCost(container) {
h += '
Cost breakdown
';
// Fines are one of the bars below, so they must be in the max or a
// fines-dominated breach produces a >100% bar width and mis-scales the rest.
+ if (!state.records) h += '
Shown once the number of records compromised is entered.
';
var maxVal = Math.max(costs.detection, costs.lostBusiness, costs.postBreach, costs.notification, costs.fines);
var bars = [
{ name: 'Lost Business Impact', val: costs.lostBusiness, cls: 'red' },
@@ -719,7 +728,7 @@ export function renderIncidentCost(container) {
{ name: 'Regulatory Fines', val: costs.fines, cls: 'purple' },
{ name: 'Notification Costs', val: costs.notification, cls: 'cyan' },
];
- for (var b = 0; b < bars.length; b++) {
+ for (var b = 0; state.records && b < bars.length; b++) {
var pct = maxVal > 0 ? Math.round(bars[b].val / maxVal * 100) : 0;
h += '
';
h += '
' + bars[b].name + '' + fmt$(bars[b].val) + '
';
@@ -1153,8 +1162,7 @@ export function renderIncidentCost(container) {
// Records
var recordsEl = wrap.querySelector('#ic-records');
- if (recordsEl) recordsEl.addEventListener('input', function() { state.records = parseInt(this.value); if (this.nextElementSibling) this.nextElementSibling.textContent = fmtN(state.records); });
- if (recordsEl) recordsEl.addEventListener('change', render);
+ if (recordsEl) recordsEl.addEventListener('change', function() { state.records = Math.max(0, parseInt(this.value, 10) || 0); render(); });
// Data types
wrap.querySelectorAll('[data-dtype]').forEach(function(cb) {
diff --git a/public/js/landing.js b/public/js/landing.js
index c1f0ec9d..bedbbb9c 100644
--- a/public/js/landing.js
+++ b/public/js/landing.js
@@ -45,6 +45,15 @@ async function appResolveAsset(os) {
return null;
}
+// "Vendor Product", without repeating the vendor when CISA lists it in the product too
+// ("UnrealIRCd" / "UnrealIRCd", "Apple" / "Apple iOS").
+function kevName(vendor, product) {
+ const v = String(vendor || "").trim(), p = String(product || "").trim();
+ if (!v || !p) return v || p;
+ const pl = p.toLowerCase(), vl = v.toLowerCase();
+ return pl === vl || pl.startsWith(vl + " ") ? p : v + " " + p;
+}
+
// Hero side panel: the newest CISA KEV additions from the daily same-origin feed. Real data
// only; on failure the panel says so instead of showing anything made up.
function loadHeroLive(view) {
@@ -54,7 +63,7 @@ function loadHeroLive(view) {
if (!box.isConnected) return;
const rows = (d && Array.isArray(d.data) ? d.data : []).slice(0, 5);
if (!rows.length) { box.innerHTML = '
'; });
@@ -1305,6 +1314,9 @@ export function renderLanding(view, actions) {
if (sec.id !== dedicatedId) sec.hidden = true;
});
const target = view.querySelector("#" + dedicatedId);
+ // the hidden hero holds the home page's h1, so the section title becomes this page's h1
+ const h2 = target && target.querySelector("h2.sec-title");
+ if (h2) { const h1 = document.createElement("h1"); for (const a of h2.attributes) h1.setAttribute(a.name, a.value); h1.innerHTML = h2.innerHTML; h2.replaceWith(h1); }
if (target) {
const back = document.createElement("div");
back.className = "dedicated-page-header";
@@ -1331,8 +1343,27 @@ export function renderLanding(view, actions) {
page.querySelector(".dn-pubbar .btn").addEventListener("click", () => actions && actions.onSignIn && actions.onSignIn());
view.prepend(page);
const mount = page.querySelector(".dn-pubmain");
- pub.load().then((render) => render(mount)).catch(() => { mount.textContent = "Couldn't load this tool. Check your connection and reload."; });
+ // the page renders after load, so a #section link (security.txt's Policy) scrolls once it exists
+ pub.load().then((render) => render(mount)).then(() => { const t = location.hash.length > 1 && document.getElementById(decodeURIComponent(location.hash.slice(1))); if (t) t.scrollIntoView(); }).catch(() => { mount.textContent = "Couldn't load this tool. Check your connection and reload."; });
document.title = pub.title + " — Darknode";
window.scrollTo(0, 0);
}
+
+ // Any other path that the app does not route either (a mistyped or retired link) gets a real
+ // "Page not found" instead of a copy of the home page at that URL. Pages the signed-in app opens
+ // (/, /all-tools, /console/...) keep the landing: signing in then opens that page.
+ const path = location.pathname.replace(/\/+$/, "") || "/";
+ if (!dedicatedId && !pub && !PAGE_ROUTES[path] && !PUBLIC_TOOLS[path] && actions && actions.isAppPath && !actions.isAppPath(location.pathname)) {
+ view.querySelectorAll(".section, .hero, .cta-final").forEach((sec) => { sec.hidden = true; });
+ const page = document.createElement("section");
+ page.className = "section dn-notfound";
+ page.innerHTML = '
Page not found
There is no page at . Check the address, or start from the home page.
" + (await import("/js/docs.js?v=20261102a")).docSectionHTML(id);
+ // (the /acceptable-use page asks for the docs section id "aup")
+ if (id !== "terms") html = "
`;
+ // a long example would run past a narrow box, so it goes in a wrapping line under it instead
+ const ph = String(f.placeholder || (typed(f) ? f.value || "" : ""));
+ const long = ph.length > 32;
+ return `
`;
}
export function renderMiniTool(main, id, opts = {}) {
diff --git a/public/js/network-tools.js b/public/js/network-tools.js
index 6b7d6731..541cdd7f 100644
--- a/public/js/network-tools.js
+++ b/public/js/network-tools.js
@@ -159,7 +159,7 @@ function renderSubnetCalculator(root) {
Enter an address in CIDR notation (e.g. 192.168.1.0/24) to get
the network address, broadcast address, usable host range, wildcard mask, binary breakdown, and class info.
Common ranges:${SUBNET_PRESETS.map(([c, n]) => ``).join("")}
@@ -169,7 +169,7 @@ function renderSubnetCalculator(root) {
The calculated network as one block. Select a block to split it in half, merge it back with its
sibling, tag what it is used for and label it. The plan below updates as you go.
-
+
Calculate a network above to draw its map.
@@ -178,21 +178,15 @@ function renderSubnetCalculator(root) {
match each segment's actual host requirement, rather than wasting addresses on a uniform prefix length.
Enter a base network and a list of required host counts (one per line, largest first is not required --
the planner sorts automatically) to get an allocation plan.
- ${field("Base network", "vlsm-base", "10.0.0.0/24", "e.g. 10.0.0.0/24")}
-
+ ${field("Base network", "vlsm-base", "", "e.g. 10.0.0.0/24")}
+
CIDR aggregator (route summarization)
Given a list of networks, find the smallest set of supernets that covers them all --
useful for summarizing routes to reduce routing-table size. Enter one CIDR block per line.
Enter a native IPv6 address in CIDR notation (compressed or expanded) to get its network
prefix, address range, and both compressed and fully-expanded forms.