【发布时间】:2016-07-06 17:51:03
【问题描述】:
我最近一直在阅读《黑帽蟒》这本书,一切正常,但是当我尝试get_mac 函数时,控制台会出现错误,具体来说:
NameError: name 'get_mac' is not defined".
我不确定这是否只是基于 Linux 的问题。
代码:
from scapy.all import *
import os
import sys
import threading
import signal
interface="en1"
target_ip="10.0.0.17"
gateway_ip="10.0.0.138"
packet_count=1000
# set up our interface
conf.iface=interface
# turn off input
conf.verg=0
print"[*] Setting up %s"%interface
gateway_mac=get_mac(gateway_ip)
【问题讨论】:
-
没有这个功能。它可能在本书的前面定义过吗?