需要调用的py文件:

  1. arp_scan.py:获取局域网活动主机的MAC地址、IP地址
  2. arp_detect.py:检测防护ARP攻击行为,并记录保存
  3. arp_display.py:显示出ARP攻击源的MAC地址、IP地址

主程序的py文件:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import arp_scan
import arp_detect
import arp_display

def main():
    # 获取局域网活动主机的MAC地址、IP地址
    hosts = arp_scan.scan_hosts()

    # 检测防护ARP攻击行为,并记录保存
    arp_detect.detect_arp_attack(hosts)

    # 显示出ARP攻击源的MAC地址、IP地址
    arp_display.display_arp_attack()

if __name__ == '__main__':
    main()

说明:

  1. 主程序调用了三个模块,分别是获取局域网活动主机的MAC地址、IP地址的arp_scan.py、检测防护ARP攻击行为的arp_detect.py、显示出ARP攻击源的MAC地址、IP地址的arp_display.py。
  2. 在main函数中,先调用arp_scan模块获取局域网活动主机的MAC地址、IP地址,然后将结果传递给arp_detect模块进行检测,最后将检测结果传递给arp_display模块进行显示

原文地址: https://www.cveoy.top/t/topic/ffA7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录