From 3133a1111fd7727d2ab007ffb4379645f606de82 Mon Sep 17 00:00:00 2001 From: hPrnicessPi3 Date: Thu, 15 May 2025 14:58:52 -0600 Subject: [PATCH] some random shit --- error.log | 0 fix_perms.sh | 2 ++ run_clear.sh | 3 +++ run_scan.php | 3 ++- run_scan.sh | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 error.log create mode 100755 fix_perms.sh create mode 100755 run_clear.sh create mode 100755 run_scan.sh diff --git a/error.log b/error.log new file mode 100644 index 0000000..e69de29 diff --git a/fix_perms.sh b/fix_perms.sh new file mode 100755 index 0000000..f261c43 --- /dev/null +++ b/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/run_clear.sh b/run_clear.sh new file mode 100755 index 0000000..ade0ec3 --- /dev/null +++ b/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/run_scan.php b/run_scan.php index 8f62243..2b54684 100644 --- a/run_scan.php +++ b/run_scan.php @@ -8,10 +8,11 @@ } $file_name = date("Ymd-Hi-s") . ".xml"; - $run_cmd = "nmap -oX scans/$file_name --stylesheet /nmaprincesspi/xsl/princesspi-nmap.xsl $post_cmd &"; + $run_cmd = "bash ./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; $exec = shell_exec($run_cmd); + echo $exec; ?> \ No newline at end of file diff --git a/run_scan.sh b/run_scan.sh new file mode 100755 index 0000000..27e7d51 --- /dev/null +++ b/run_scan.sh @@ -0,0 +1,2 @@ +#!/bin/bash +eval "$* 2>>./error.log 1>/dev/null&" \ No newline at end of file