trying to build a MODBUS packet with scapy
<p>i'm trying to build a MODBUS packet with scapy,
<strong>but  Wireshark can't recognize it. i mean, the MODBUS interpreted as the TCP data.</strong></p>

<p>here is the python code of Scapy:</p>

<pre><code>from scapy.all import *


class Modbus(Packet):
    name = "Modbus/tcp"
    fields_desc = [ ShortField("Transaction Identifier", 1),
                    ShortField("Protocol Identifier", 0),
                    ShortField("Length", 5),
                    XByteField("Unit Identifier",0),
                    ]

def make_test():
    pkt = TCP(sport=502, dport=502)
    return Ether()/IP(src="5.5.5.101",dst="5.5.5.100")/pkt/Modbus()


while True:
    send(make_test())
</code></pre>

<p>someone has an idea how to fix it?</p>