文章目录
Python-nmap端口扫描
实例代码
#!/usr/bin/env python
# coding: utf-8
# In[4]:
import nmap
scanner = nmap.PortScanner()
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('''\n
1) SYN ACK Scan
2) UDP Scan
3) Comprehensive Scan''')
print('You hava selected option: ', resp)
if resp == '1':
print('Nmap Version: ', scanner.nmap_version