私は最近、著書、「ブラックハットパイソン」を通じて、次のしてきた定義されていない、それは大丈夫をされているが、私はget_mac
機能をしようとすると、コンソールには具体的には、エラーを吐く:UbuntuのPythonの:「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)
このような機能はありません。それは本の早い段階で定義されたのでしょうか? –