From 7300bbf3618f892affcac971f59d489a36723204 Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Tue, 4 Aug 2020 14:33:49 +0200 Subject: [PATCH] =?UTF-8?q?small=20fixes=C2=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- first_scan.sh | 1 + util.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/first_scan.sh b/first_scan.sh index 24a2569..b8437a3 100755 --- a/first_scan.sh +++ b/first_scan.sh @@ -25,6 +25,7 @@ echo "[+] Scanning for open ports…" PORTS=$(nmap -p- --min-rate=1000 -T4 ${IP_ADDRESS} | grep ^[0-9] | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//) if [ -z "${PORTS}" ]; then echo "[-] No open ports found" + exit fi echo "[+] Open ports: ${PORTS}" diff --git a/util.py b/util.py index 585353f..54239ab 100644 --- a/util.py +++ b/util.py @@ -101,7 +101,7 @@ if __name__ == "__main__": command = sys.argv[1] if command == "getAddress": - if len(sys.argv) >= 2: + if len(sys.argv) >= 3: print(getAddress(sys.argv[2])) else: print(getAddress())