I've recently been following through the book, "Black hat python", it's been alright but when I try the get_mac
function the console spits out an error, specifically:
NameError: name 'get_mac' is not defined".
I am not sure if this just is a Linux based issue.
Code:
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)