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

Solution: Import the 'sniff' module

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

from scapy import sniff

 

For more information:
Python scapy sniff