From 828e75a96f0a0612ac5e40f14e5ce995f085a20f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 17 Mar 2023 23:40:48 +0100 Subject: open-ports: use -Pn Assume the host is live if something's blocking ICMP. --- src/open-ports.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/open-ports.sh') diff --git a/src/open-ports.sh b/src/open-ports.sh index c81290d..9bac83c 100755 --- a/src/open-ports.sh +++ b/src/open-ports.sh @@ -92,7 +92,7 @@ main() { check_tool nmap xmlstarlet parse_args "$@" - nmap ${nmap_args[@]+"${nmap_args[@]}"} -oX - -- "$host" | xmlstarlet sel -t -v '//port[state/@state="open"]/@portid' -nl + nmap -Pn ${nmap_args[@]+"${nmap_args[@]}"} -oX - -- "$host" | xmlstarlet sel -t -v '//port[state/@state="open"]/@portid' -nl } main "$@" -- cgit v1.2.3