diff --git a/CHANGELOG.txt b/CHANGELOG.txt new file mode 100644 index 0000000..b2b8512 --- /dev/null +++ b/CHANGELOG.txt @@ -0,0 +1,2 @@ +v0.1-dev + initial working state \ No newline at end of file diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..e12dc76 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +v0.1-dev \ No newline at end of file diff --git a/fix_perms.sh b/fix_perms.sh deleted file mode 100755 index f261c43..0000000 --- a/fix_perms.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo chown -R www-data:www-data . 2>>error.log \ No newline at end of file diff --git a/run_clear.sh b/run_clear.sh deleted file mode 100755 index ade0ec3..0000000 --- a/run_clear.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -rm -f error.log 2>>./error.log -rm -f scans/* 2>>./error.log \ No newline at end of file diff --git a/run_scan.php b/run_scan.php index 3861bc6..e088583 100644 --- a/run_scan.php +++ b/run_scan.php @@ -7,8 +7,8 @@ $post_cmd = substr($_POST['nmapcmd'], 5); } - $file_name = date("Ymd-Hi-s") . ".xml"; - $run_cmd = "bash ./run_scan.sh nmap -oX scans/$file_name --stylesheet /nmaprincesspi/xsl/princesspi-nmap.xsl $post_cmd"; + $file_name = date("Ymd-Hi-s") . "-" . rand(1000000,9999999) . ".xml"; + $run_cmd = "bash ./scripts/run_scan.sh nmap -oX scans/$file_name --stylesheet /nmaprincesspi/xsl/princesspi-nmap.xsl $post_cmd"; $web_name = "/nmaprincesspi/scans/$file_name"; echo $web_name; diff --git a/run_scan.sh b/run_scan.sh deleted file mode 100755 index 27e7d51..0000000 --- a/run_scan.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -eval "$* 2>>./error.log 1>/dev/null&" \ No newline at end of file diff --git a/scripts/fix_perms.sh b/scripts/fix_perms.sh new file mode 100755 index 0000000..a128a1b --- /dev/null +++ b/scripts/fix_perms.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo chown -R www-data:www-data .. 2>>../error.log \ No newline at end of file diff --git a/nmap-script.sh b/scripts/nmap-script.sh similarity index 100% rename from nmap-script.sh rename to scripts/nmap-script.sh diff --git a/scripts/run_clear.sh b/scripts/run_clear.sh new file mode 100755 index 0000000..3b0cdc1 --- /dev/null +++ b/scripts/run_clear.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rm -f ../error.log 2>>./error.log +rm -f ../scans/* 2>>./error.log \ No newline at end of file diff --git a/scripts/run_scan.sh b/scripts/run_scan.sh new file mode 100755 index 0000000..60c54a9 --- /dev/null +++ b/scripts/run_scan.sh @@ -0,0 +1,2 @@ +#!/bin/bash +eval "$* 2>>../error.log 1>/dev/null&" \ No newline at end of file diff --git a/todo.txt b/todo.txt index 098b10d..0977d0d 100644 --- a/todo.txt +++ b/todo.txt @@ -1,8 +1,15 @@ x xhr->run_scan.php -move and edit scripts +x add random number to file to prevent enumeration +x move and edit scripts status/notify when done - polling? + polling xml file? +error handling + nmap fail + php script fail + input validation fail +containerize scans listing -work on scans filename? +c work on scans filename? fix perms -auth system \ No newline at end of file +auth system +input/output validation \ No newline at end of file