diff --git a/ch04/host_monitor_notification.sh b/ch04/host_monitor_notification.sh index cc933a4..3f7c2b3 100644 --- a/ch04/host_monitor_notification.sh +++ b/ch04/host_monitor_notification.sh @@ -10,7 +10,7 @@ TO_ADDR="security@blackhatbash.com" while true; do echo "Performing an ARP scan against ${NETWORK}..." sudo arp-scan -x -I ${INTERFACE} ${NETWORK} | while read -r line; do - host="$(echo "${line}" | awk '{print $1}')" + host=$(echo "${line}" | awk '{print $1}') if ! grep -q "${host}" "${KNOWN_HOSTS}"; then echo "Found a new host: ${host}!" echo "${host}" >> "${KNOWN_HOSTS}" diff --git a/ch04/port_watchdog.sh b/ch04/port_watchdog.sh index 580ba96..bebe9f1 100644 --- a/ch04/port_watchdog.sh +++ b/ch04/port_watchdog.sh @@ -1,7 +1,7 @@ #!/bin/bash LOG_FILE="watchdog.log" -IP_ADDRESS="$1" -WATCHED_PORT="$2" +IP_ADDRESS="${1}" +WATCHED_PORT="${2}" service_discovery(){ local host