Scapy不发送大UDP数据包

时间:2017-06-28 13:13:41

标签: python networking udp scapy

我尝试通过scapy发送UDP数据包,但是当我尝试发送一些有点大的内容(例如1800个字符的Raw加载)时,它根本不会发送它。

def send_info(info):
    msg = IP(dst=MANAGER_IP) / UDP(dport = MANAGER_PORT) / \
    Raw(load = ("AAAAAAAAAAAA" + info)) #for some reason it throws out the first 12 charaters
    print("Sending...")
    send(msg, verbose=False)
    print("Sent!")

1 个答案:

答案 0 :(得分:0)

在许多系统和网络上,最大UDP数据包大小约为1500字节,在公共互联网上则更少。

请参阅What is the largest Safe UDP Packet Size on the Internet