MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / updateThreatIntelStats

Function updateThreatIntelStats

web/scripts/ragnar_modern.js:14905–14927  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

14903 }
14904 } catch (error) {
14905 statusEl.textContent = `Unexpected error starting scan: ${error.message}`;
14906 statusEl.dataset.currentIp = '';
14907 } finally {
14908 buttonEl.disabled = false;
14909 buttonEl.classList.remove('cursor-wait', 'opacity-80');
14910 buttonEl.textContent = buttonEl.dataset.defaultText;
14911 }
14912}
14913
14914// ============================================================================
14915// IP RANGE SCAN (host discovery) — Hosts tab
14916// ============================================================================
14917
14918// Last results, kept for the CSV export button.
14919let _rangeScanResults = [];
14920let _rangeScanLabel = '';
14921
14922// Lightweight client-side sanity check; the server is the real validator.
14923function _looksLikeRange(value) {
14924 const v = (value || '').trim().replace(/[–—−]/g, '-');
14925 if (!v) return false;
14926 const octet = '(25[0-5]|2[0-4]\\d|1?\\d?\\d)';
14927 const ipv4 = `${octet}(\\.${octet}){3}`;
14928 const cidr = new RegExp(`^${ipv4}/(\\d|[12]\\d|3[0-2])$`);
14929 const startEnd = new RegExp(`^${ipv4}-(${ipv4}|${octet})$`);
14930 const single = new RegExp(`^${ipv4}$`);

Callers

nothing calls this directly

Calls 2

updateSourceStatusFunction · 0.70
updateTopThreatsListFunction · 0.70

Tested by

no test coverage detected