From 984d5df7c79a889b289534c6b49063d2aead03d8 Mon Sep 17 00:00:00 2001 From: hPrnicessPi3 Date: Thu, 15 May 2025 19:14:32 -0600 Subject: [PATCH] v0.5-dev --- changelog.txt | 7 ++++++- index.php | 20 +++++++++++++------- js/nmaprincesspi.js | 7 ++++--- run_clear_scans.php | 4 ++++ run_scan.php | 4 +++- scripts/run_scan.sh | 2 +- version.txt | 2 +- 7 files changed, 32 insertions(+), 14 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2cdada6..1058f26 100644 --- a/changelog.txt +++ b/changelog.txt @@ -13,4 +13,9 @@ v0.3-dev v0.4-dev bug fixes layout improvements - efficiency improvements \ No newline at end of file + efficiency improvements + +v0.5-dev + added csrf protection + bug fixes + layout improvements \ No newline at end of file diff --git a/index.php b/index.php index 789b329..fdf2309 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,8 @@ - Princess Pi's Magical Nmap Web Thingy! (nmaprincesspi) + Princess Pi's Magical Nmapprincesspi Thingy! -

Princess Pi's Magical Nmap Web Thingy! (nmapprincesspi)

+

Princess Pi's Magical Nmapprincesspi Thingy!


+

@@ -26,11 +31,12 @@ foreach($scans as $scan) {

+ -
-
- \ No newline at end of file diff --git a/js/nmaprincesspi.js b/js/nmaprincesspi.js index eca4dd3..6acf8b0 100644 --- a/js/nmaprincesspi.js +++ b/js/nmaprincesspi.js @@ -107,7 +107,7 @@ function xhrRunNmapScan(xhrRet) { getID('link').innerHTML = 'Scan Report ('+xhrJson.webName+')'; getID('link').style.display = "inline"; - getID('progress').innerHTML = ''; + getID('progressbox').innerHTML = ''; getID('progress').style.display = 'none'; pollFile(xhrJson.runningLog); @@ -115,8 +115,8 @@ function xhrRunNmapScan(xhrRet) { function xhrPollFile(xhrRet) { let xhrResponseText = xhrRet.target.responseText; - getID('progress').innerHTML = xhrResponseText; getID('progress').style.display = "block"; + getID('progressbox').innerHTML = xhrResponseText; } function pollFile(runningLog) { @@ -127,7 +127,8 @@ function pollFile(runningLog) { function runNmapScan() { let nmapcmd = getID('nmapcmd').value; - let postData = 'nmapcmd='+encodeURIComponent(nmapcmd); + let nonce = getID('nonce').value; + let postData = 'nmapcmd='+encodeURIComponent(nmapcmd)+'&nonce='+nonce; doXhr('run_scan.php', xhrRunNmapScan, 'POST', postData); } diff --git a/run_clear_scans.php b/run_clear_scans.php index fce28af..c261ea1 100644 --- a/run_clear_scans.php +++ b/run_clear_scans.php @@ -1,4 +1,8 @@ >logs/error.log 1>logs/$runningLog&" +eval "$* 2>>logs/error.log 1>>logs/$runningLog&" echo "/nmaprincesspi/logs/$runningLog" \ No newline at end of file diff --git a/version.txt b/version.txt index aa63509..21af665 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v0.3-dev \ No newline at end of file +v0.5-dev \ No newline at end of file