How to Solve NameError: name 'srp' is not defined -- scapy

Solution: Import the 'srp' module

To Solve the error, add the following line to the top of your code.

from scapy import srp

 

For more information:
Python scapy srp