drdot
drdot

Reputation: 3347

How to send UDP packet to specific UDP dst port in scapy?

I would like to send my packet to a UDP dst port number and send it through eth0 interface (if scapy handles my layer2 directly, then eth0 does not need to be given as an argument)

Upvotes: 13

Views: 44554

Answers (1)

Ortomala Lokni
Ortomala Lokni

Reputation: 62496

Using the scapy documentation, we see that sending an UDP packet is as simple as:

send(IP(dst="127.0.0.1")/UDP(dport=123)/Raw(load="abc"))

Upvotes: 18

Related Questions