Skip to content

Commit

Permalink
Removed extra sudo that was hanging the script.
Browse files Browse the repository at this point in the history
  • Loading branch information
bellma101 committed Mar 11, 2019
1 parent 69702bf commit c46cc50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions chomp-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1080,14 +1080,13 @@ function run_masscan() {
if [[ "$NOTICA" != "" ]]; then
run_notica_sudo;
fi
sudo "$MASSCAN" -p1-65535 -iL "$WORKING_DIR"/$ALL_IP --rate=7000 -oL "$WORKING_DIR"/masscan-output.txt;
sudo "$MASSCAN" -p1-65535 -iL "$WORKING_DIR"/$ALL_IP --rate=7000 -oL "$WORKING_DIR"/root-masscan-output.txt;
END=$(date +%s);
DIFF=$(( END - START ));
echo -e "$GREEN""[i]$BLUE Masscan took $DIFF seconds to run.""$NC";

# Trim # from first and last lines of output
grep -v '#' "$WORKING_DIR"/masscan-output.txt > "$WORKING_DIR"/temp;
sudo mv "$WORKING_DIR"/temp "$WORKING_DIR"/masscan-output.txt;
grep -v '#' "$WORKING_DIR"/root-masscan-output.txt > "$WORKING_DIR"/masscan-output.txt;
fi
}

Expand Down

0 comments on commit c46cc50

Please sign in to comment.