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

Function updateVulnStats

web/scripts/ragnar_modern.js:19538–19569  ·  view source on GitHub ↗
(scans, findings)

Source from the content-addressed store, hash-verified

19536 addConsoleMessage('No recent activity logged', 'info');
19537 addConsoleMessage('Waiting for new events...', 'info');
19538 }
19539 return;
19540 }
19541
19542 const cleanedLogs = logs
19543 .map(log => typeof log === 'string' ? log.trim() : '')
19544 .filter(log => log && !shouldHideConsoleLog(log));
19545
19546 if (cleanedLogs.length === 0) {
19547 return;
19548 }
19549
19550 let newLogLines = [];
19551 if (!lastConsoleLogLine) {
19552 consoleBuffer = [];
19553 newLogLines = cleanedLogs.slice(-MAX_CONSOLE_LINES);
19554 } else {
19555 const lastIndex = cleanedLogs.lastIndexOf(lastConsoleLogLine);
19556 if (lastIndex === cleanedLogs.length - 1) {
19557 lastConsoleLogLine = cleanedLogs[cleanedLogs.length - 1];
19558 return;
19559 }
19560 if (lastIndex !== -1) {
19561 newLogLines = cleanedLogs.slice(lastIndex + 1);
19562 } else {
19563 consoleBuffer = [];
19564 newLogLines = cleanedLogs.slice(-MAX_CONSOLE_LINES);
19565 }
19566 }
19567
19568 if (newLogLines.length === 0) {
19569 lastConsoleLogLine = cleanedLogs[cleanedLogs.length - 1];
19570 return;
19571 }
19572

Callers 1

loadAdvancedVulnDataFunction · 0.70

Calls 3

addMethod · 0.80
filterMethod · 0.80
updateElementFunction · 0.70

Tested by

no test coverage detected