Skip to content

Commit

Permalink
Fix the rustscan path
Browse files Browse the repository at this point in the history
  • Loading branch information
dolevf committed Nov 23, 2023
1 parent 47a1a6d commit 4a6c96d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ch04/port_watchdog.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
RUST_SCAN_BIN="/home/kali/tools/RustScan/target/release/rustscan"
LOG_FILE="watchdog.log"
IP_ADDRESS="$1"
WATCHED_PORT="$2"
Expand All @@ -14,7 +13,7 @@ service_discovery(){
}

while true; do
port_scan=$("${RUST_SCAN_BIN}" -a "${IP_ADDRESS}" -g -p "${WATCHED_PORT}")
port_scan=$(docker run --network=host -it --rm --name rustscan rustscan/rustscan:2.1.1 -a "${IP_ADDRESS}" -g -p "${WATCHED_PORT}")
if [[ -n "${port_scan}" ]]; then
echo "${IP_ADDRESS} has started responding on port ${WATCHED_PORT}!"
echo "Performing a service discovery..."
Expand All @@ -26,4 +25,4 @@ while true; do
echo "Port is not yet open, sleeping for 5 seconds..."
sleep 5
fi
done
done

0 comments on commit 4a6c96d

Please sign in to comment.