This commit is contained in:
2025-05-15 18:23:13 -06:00
parent bdf524f0d0
commit dc9a126a3c
2 changed files with 9 additions and 6 deletions
+8 -6
View File
@@ -2,6 +2,9 @@
Princess Pi's Magical Standard Code! Princess Pi's Magical Standard Code!
*/ */
// globals
var pollInterval = null;
function getID(ID) { function getID(ID) {
return document.getElementById(ID); return document.getElementById(ID);
} }
@@ -90,18 +93,17 @@ function xhrRunNmapScan(xhrRet) {
// let xhrResponseText = xhrRet.target.responseText; // let xhrResponseText = xhrRet.target.responseText;
xhrJson = JSON.parse(xhrRet.target.responseText); xhrJson = JSON.parse(xhrRet.target.responseText);
getID('link').innerHTML = '<a href="'+xhrJson.webName+'">Scan Report ('+xhrJson.webName+')</a>'; if(pollInterval !== null && typeof pollInterval !== 'undefined') {
getID('link').style.display = "inline";
if(typeof pollInterval !== 'undefined') {
clearInterval(pollInterval); clearInterval(pollInterval);
} }
getID('link').innerHTML = '<a href="'+xhrJson.webName+'">Scan Report ('+xhrJson.webName+')</a>';
getID('link').style.display = "inline";
getID('progress').innerHTML = ''; getID('progress').innerHTML = '';
getID('progress').style.display = 'none'; getID('progress').style.display = 'none';
pollFile(xhrJson.runningLog); pollFile(xhrJson.runningLog);
} }
function xhrPollFile(xhrRet) { function xhrPollFile(xhrRet) {
@@ -111,7 +113,7 @@ function xhrPollFile(xhrRet) {
} }
function pollFile(runningLog) { function pollFile(runningLog) {
var pollInterval = setInterval(function() { pollInterval = setInterval(function() {
doXhr(runningLog, xhrPollFile); doXhr(runningLog, xhrPollFile);
}, 1000); }, 1000);
} }
+1
View File
@@ -3,6 +3,7 @@ x add random number to file to prevent enumeration
x move and edit scripts x move and edit scripts
x status/notify when done x status/notify when done
x polling xml file? x polling xml file?
x bug on second scan in progress pre
error handling error handling
nmap fail nmap fail
php script fail php script fail