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

Solution: Import the 'DNS' module

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

from scapy import DNS

 

For more information:
Python scapy DNS