I have a recurring problem where packets I send with scapy don't arrive. I tried to sniff them using scapy and wireshark, but they don't get sniffed. It's as if they weren't sent, but the script sending them displays the "sent 1 packet" message.
I looked it up and found this similar question that the problem might be that the packet is sent to the wrong interface. this seems likely, because my scapy's default iface is set to "eth0", and I sniff on my wifi connection. If this is really the problem, how do i set scapy to send & sniff on the wifi connection?
code example:
from scapy.all import *
message = raw_input("enter your message:")
for c in message:
packet = Ether() / IP(dst = "127.0.0.1") / UDP(sport = 4001, dport = ord(c))
send(packet)
raw_input()
In this script is supposed to send a message to a server by sending empty UDP packets to ports signifying the letters. The script runs fine, I just don't get any packets on my "server", and the packet this script supposedly sends cannot be sniffed.
EDIT: my os is windows 8.1