The program runs fine when I am not trying to filter http links but it shows almost nothing when I use the code, I don't see any problem in the code and I have already used pip install scapy_http
.
import scapy.all as scapy
from scapy.layers import http
def sniff(interface):
scapy.sniff(iface=interface, store=False , prn= process_sniffed_packet)
def process_sniffed_packet(packet):
if packet.haslayer(http.HTTPRequest):
print(packet)
sniff('eth0')
Blank screen until i press ctrl+c
. It shows some weird links after around 20 seconds but I am not on those pages.