aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-03-17 23:40:48 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-03-17 23:40:51 +0100
commit828e75a96f0a0612ac5e40f14e5ce995f085a20f (patch)
tree03ad3d8518a8396875fcc7c4550022c6d2f509af
parentadd open-ports.sh (diff)
downloadaudit-scripts-828e75a96f0a0612ac5e40f14e5ce995f085a20f.tar.gz
audit-scripts-828e75a96f0a0612ac5e40f14e5ce995f085a20f.zip
open-ports: use -Pn
Assume the host is live if something's blocking ICMP.
-rwxr-xr-xsrc/open-ports.sh2
1 files changed, 1 insertions, 1 deletions
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 "$@"