summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fedele <dan.fedele@gmail.com>2020-06-02 15:58:08 -0400
committerGitHub <noreply@github.com>2020-06-02 15:58:08 -0400
commit3167009669573a51798e84ac28232fde99fe65d9 (patch)
tree21a475e8e6d5e4984f1d44725f86f3e94ccc5373
parent7f575cc8d915b79de893c667fdaa6fa6e431baaa (diff)
allowed non-root users to run the scan function
well, assuming that the non-root user has sudo access.
-rw-r--r--master-bash_functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/master-bash_functions b/master-bash_functions
index c3e39f1..0b5026c 100644
--- a/master-bash_functions
+++ b/master-bash_functions
@@ -4,6 +4,6 @@ scan() {
echo "Scanning with masscan..."
echo "If this takes way too long, ping $1 in a separate terminal"
echo "because masscan has a weird bug that holds connections open or something"
- P=$(masscan -p 1-65535 -e tun0 --rate=1000 $1 | grep Discovered | awk '{print $4}' | cut -d/ -f1 | tr "\n" "," | sed 's/\,$/\n/') ; nmap -sC -sV -p $P -oN scanresults-$1.txt $1
+ P=$(sudo masscan -p 1-65535 -e tun0 --rate=1000 $1 | grep Discovered | awk '{print $4}' | cut -d/ -f1 | tr "\n" "," | sed 's/\,$/\n/') ; sudo nmap -sC -sV -p $P -oN scanresults-$1.txt $1
echo "Stored results in scanresults-$1.txt"
}