Linux 我如何开始制作自己的简单的基于UNIX的网络扫描仪?

Linux 我如何开始制作自己的简单的基于UNIX的网络扫描仪?,linux,networking,scanning,Linux,Networking,Scanning,我正在使用Linux进行安全和渗透测试。我经常使用nmap和wireshark,但我想自己制作一个网络扫描仪来了解它们的工作原理 我希望它扫描整个网络,而不是扫描一个目标的端口,但我不知道从哪里开始 对于基于命令行的应用程序,有人会使用哪些编程/脚本语言 网络扫描仪以及制作过程中从何处开始?试用python+ Scapy是一个强大的交互式数据包处理程序。它是 能够伪造或解码多种协议的数据包,发送 他们在网上,捕捉他们,匹配请求和回复,等等 更多 这里有一些样品可以感受到它的力量(没有检查,可能有

我正在使用Linux进行安全和渗透测试。我经常使用
nmap
wireshark
,但我想自己制作一个网络扫描仪来了解它们的工作原理

我希望它扫描整个网络,而不是扫描一个目标的端口,但我不知道从哪里开始

对于基于命令行的应用程序,有人会使用哪些编程/脚本语言 网络扫描仪以及制作过程中从何处开始?

试用python+

Scapy是一个强大的交互式数据包处理程序。它是 能够伪造或解码多种协议的数据包,发送 他们在网上,捕捉他们,匹配请求和回复,等等 更多

这里有一些样品可以感受到它的力量(没有检查,可能有点过时):

从Ubuntu向Windows 7发送ping数据包 使用随机源地址从Ubuntu上的Scapy创建到Windows 7上端口80的TCP SYN
ip = IP() # Creates an IP header
ip.src = '192.168.1.25' # Source address in the IP header is configured with IP address of ubuntu.
ip.dst = '192.168.1.100' # Destination address in the IP header is configured with the IP address of Windows 7.
icmp = ICMP() # Creates an ICMP header
icmp.type = 8 # Type value inserted in ICMP header as 8 for ping crafting
icmp.code = 0 # Code value inserted in ICMP header as 0 for ping crafting.
send(ip/icmp) # Sending ping packet.
cp = TCP() # Creates a TCP header
tcp.dport = 80 # Configures the destination port in the TCP header with port 80.
tcp.flags = ’S’ # Configure the flag in the TCP header with the SYN bit.
ip = IP() # Creates an IP header
ip.src = '192.168.1.25' # Source address in the IP header is configured with IP address of ubuntu.
ip.dst = '192.168.1.100' # Destination address in the IP header is configured with the IP address of Windows 7.
send(ip/tcp) # Sending tcp packet.