def scan_networkifname active_hosts = with openactive_hoststxt w as f for ip mac in ip_mac_dictitems fwritefIP Address ip MAC Address macn for i in range1 255 dst_ip
在调用scan_network函数时,需要传入ifname参数,即网络接口名。如果报错提示ifname未定义,可能是因为在调用save_records函数时没有传入ifname参数。需要在调用save_records函数时传入ifname参数,例如:save_records("eth0")。同时需要确保ifname参数的值正确,可以通过ifconfig命令查看当前系统的网络接口名。
原文地址: https://www.cveoy.top/t/topic/fnPR 著作权归作者所有。请勿转载和采集!