瀏覽代碼

small fixes§

Roman Hergenreder 3 年之前
父節點
當前提交
7300bbf361
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      first_scan.sh
  2. 1 1
      util.py

+ 1 - 0
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}"

+ 1 - 1
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())