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

穿精又带淫゛_ 提交于 2020-03-21 15:09:09

问题


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)


回答1:


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"))


来源:https://stackoverflow.com/questions/28598330/how-to-send-udp-packet-to-specific-udp-dst-port-in-scapy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!