QT---基于WinPcap的局域网络管理工具(主机扫描、包过滤、ARP攻击、端口扫描)

3 篇文章 0 订阅
2 篇文章 0 订阅

主要功能

  • 本机适配器扫描
  • 局域网各主机扫描
  • 类似于WinShark的抓包工具,能够简单的过滤Tcp、Udp、Arp等包
  • ARP攻击功能,限制局域网内指定主机上网
  • 流量统计,统计实时网速
  • 多线程攻击,多线程扫描,更快速,全方位

开发环境和工具简介

  开发环境:基于QT5和WinPcap开发
  开发工具:QT Creator
  调试工具:WinShark+nmap+Windump

主界面

这里写图片描述

功能一:主机信息扫描

这里写图片描述

功能二:局域网主机扫描

这里写图片描述

功能三:ARP 攻击

这里写图片描述

功能四:过滤抓包

这里写图片描述

功能五:Ping功能

这里写图片描述

功能六:端口扫描功能

这里写图片描述

功能七:实时网速显示

这里写图片描述

工程代码

https://github.com/freeape/sniffertoolserver

  • 3
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
以下是一个基于WinPcap的网络抓Python程序的示例代码: ``` import socket import struct import sys import threading from ctypes import * from winpcapy import * # define constants PCAP_ERRBUF_SIZE = 256 # define structure for IP header class IP(Structure): _fields_ = [ ("ihl", c_ubyte, 4), ("version", c_ubyte, 4), ("tos", c_ubyte), ("len", c_ushort), ("id", c_ushort), ("offset", c_ushort), ("ttl", c_ubyte), ("protocol_num", c_ubyte), ("sum", c_ushort), ("src", c_ulong), ("dst", c_ulong) ] def __new__(self, data=None): return self.from_buffer_copy(data) def __init__(self, data=None): # map protocol constants to their names self.protocol_map = {1: "ICMP", 6: "TCP", 17: "UDP"} # human readable IP addresses self.src_address = socket.inet_ntoa(struct.pack("<L", self.src)) self.dst_address = socket.inet_ntoa(struct.pack("<L", self.dst)) # human readable protocol try: self.protocol = self.protocol_map[self.protocol_num] except: self.protocol = str(self.protocol_num) # define callback function for packet capture def packet_handler(header, data): # parse IP header ip_header = IP(data) # print out packet information print("Protocol: %s, Source: %s, Destination: %s" % (ip_header.protocol, ip_header.src_address, ip_header.dst_address)) def main(): # open network adapter for capturing errbuf = create_string_buffer(PCAP_ERRBUF_SIZE) adapter = pcap_open_live("eth0", 65536, 1, 1000, errbuf) if not adapter: print("Unable to open adapter: %s" % errbuf.value.decode("utf-8")) sys.exit(1) # start packet capture loop try: pcap_loop(adapter, -1, packet_handler, None) except KeyboardInterrupt: pass # close the adapter pcap_close(adapter) if __name__ == "__main__": main() ``` 这个程序使用WinPcap库来捕获网络数据,并使用Python中的ctypes库来定义IP头的结构体。程序打开一个名为“eth0”的网络适配器,然后进入无限循环以捕获数据。当用户按下Ctrl + C时,程序将退出循环并关闭适配器。程序还括一个处理程序回调函数,它将在每个捕获的数据上运行,并打印有关该的一些信息。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值