From 072e07ac149d4775e36046ee312b9de7b99a99f6 Mon Sep 17 00:00:00 2001 From: numaan911098 <50366430+numaan911098@users.noreply.github.com> Date: Tue, 4 Jul 2023 12:27:49 +0530 Subject: [PATCH 1/3] Update Scanner.py There were a lot of typos for example print("nmap version: "sccaner.nmap_version()). It should be scanner.nmap_version() and so many i didn't changed add any new code or function to it i just fixed the errors so that it can run. --- Scanner.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Scanner.py b/Scanner.py index 9bf42ba..28e27eb 100644 --- a/Scanner.py +++ b/Scanner.py @@ -9,27 +9,24 @@ ip_addr = input("Please enter the IP address you want to scan: ") print("The IP you entered is: ", ip_addr) -type(ip_addr) resp = input("""\nPlease enter the type of scan you want to run - 1)SYN ACK Scan - 2)UDP Scan - 3)Comprehensive Scan \n""") + 1) SYN ACK Scan + 2) UDP Scan + 3) Comprehensive Scan \n""") print("You have selected option: ", resp) -resp_dict={'1':['-v -sS','tcp'],'2':['-v -sU','udp'],'3':['-v -sS -sV -sC -A -O','tcp']} + +resp_dict = {'1': ['-v -sS', 'tcp'], '2': ['-v -sU', 'udp'], '3': ['-v -sS -sV -sC -A -O', 'tcp']} if resp not in resp_dict.keys(): - print("enter a valid option") + print("Enter a valid option") else: - print("nmap version: "sccaner.nmap_version()) - scanner.scan(ip_addr,"1-1024",resp_dict[resp][0]) #the # are port range to scan, the last part is the scan type + print("nmap version:", scanner.nmap_version()) + scanner.scan(ip_addr, "1-1024", resp_dict[resp][0]) print(scanner.scaninfo()) - if scanner.scaninfo()=='up': - print("Scanner Status: ",scanner[ip_addr].state()) + if 'up' in scanner[ip_addr].state(): + print("Scanner Status: ", scanner[ip_addr].state()) print(scanner[ip_addr].all_protocols()) - print("Open Ports: ",scanner[ip_addr][resp_dict[resp][1]].keys()) #display all open ports - - - + print("Open Ports: ", scanner[ip_addr][resp_dict[resp][1]].keys()) From a23f7a5fbacb59626522708ce98e049532989bb1 Mon Sep 17 00:00:00 2001 From: numaan911098 <50366430+numaan911098@users.noreply.github.com> Date: Tue, 4 Jul 2023 12:29:50 +0530 Subject: [PATCH 2/3] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d53ecb2..7fbaef0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # Python3-NmapScanner Simple network scanner - built with Python3 and Nmap. + +## requirements: +`pip3 install pyhton-nmap` From d8e350f38841dafab843488d335f86a909150892 Mon Sep 17 00:00:00 2001 From: numaan911098 <50366430+numaan911098@users.noreply.github.com> Date: Tue, 4 Jul 2023 12:30:22 +0530 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7fbaef0..5f32bf7 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ Simple network scanner - built with Python3 and Nmap. ## requirements: -`pip3 install pyhton-nmap` +`pip3 install python-nmap`