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

Function loadNetworkMap

web/scripts/ragnar_modern.js:20985–21057  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20983 if (exploitBtn) {
20984 if (entry.type === 'vulnerability') {
20985 exploitBtn.classList.remove('hidden');
20986 exploitBtn.onclick = () => exploitVulnerability(entry);
20987 } else {
20988 exploitBtn.classList.add('hidden');
20989 }
20990 }
20991
20992 // Update research button
20993 const researchBtn = document.getElementById('netkb-research-btn');
20994 if (researchBtn) {
20995 researchBtn.onclick = () => researchEntry(entry);
20996 }
20997
20998 modal.classList.remove('hidden');
20999 modal.classList.add('flex');
21000}
21001
21002function closeNetkbModal() {
21003 const modal = document.getElementById('netkb-detail-modal');
21004 if (modal) {
21005 modal.classList.add('hidden');
21006 modal.classList.remove('flex');
21007 }
21008}
21009
21010function refreshNetkbData() {
21011 fetchNetkbData();
21012 showNetkbSuccess('NetKB data refreshed');
21013}
21014
21015function exportNetkbData() {
21016 const format = prompt('Export format (json/csv):', 'json');
21017 if (format && (format === 'json' || format === 'csv')) {
21018 window.open(`/api/netkb/export?format=${format}`, '_blank');
21019 showNetkbSuccess(`NetKB data exported as ${format.toUpperCase()}`);
21020 }
21021}
21022
21023function exportNetkbEntry() {
21024 // Export the currently viewed entry
21025 showNetkbInfo('Individual entry export feature coming soon');
21026}
21027
21028function researchEntry(entry) {
21029 let searchUrl = 'https://www.google.com/search?q=';
21030 let searchTerm = '';
21031
21032 if (entry.cve) {
21033 searchTerm = entry.cve;
21034 } else if (entry.service) {
21035 searchTerm = `${entry.service} vulnerability exploit`;
21036 } else {
21037 searchTerm = `${entry.host} ${entry.description}`;
21038 }
21039
21040 window.open(searchUrl + encodeURIComponent(searchTerm), '_blank');
21041 showNetkbInfo(`Researching: ${searchTerm}`);
21042}

Callers 3

showNetworkSubtabFunction · 0.70
loadTabDataFunction · 0.70
refreshNetworkMapFunction · 0.70

Calls 7

_checkMapAiStatusFunction · 0.70
loadScanSubnetsFunction · 0.70
_showMapAiSpinnerFunction · 0.70
networkAwareFetchFunction · 0.70
_buildMapLegendFunction · 0.70
renderNetworkMapFunction · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected