so when i'm trying to import http for scapy in a python code like this
from scapy.layers.http import *
it returns this error
ModuleNotFoundError: No module named 'scapy.layers.http'
but in the scapy terminal it works perfecty fine, i tried to look up the error on google but i can't find anything about it, all i find is peoples telling that you have to import http like this (from scapy.layers.http import *) but that doesn't work for me, any idea how i can fix that? or other ways i can filter http packets?
test code:
from scapy.all import *
from scapy.layers.http import *
def ccc(pack):
return HTTP in pack
a = sniff(lfilter=ccc, count=1)
a.show()
error:
Traceback (most recent call last):
File "C:/Users/name/Desktop/python tests/dontdeleteitit'stest.py", line 2, in <module>
from scapy.layers.http import *
ModuleNotFoundError: No module named 'scapy.layers.http'