You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
260 B

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import scapy.all as scapy
import scapy.contrib.modbus as mb
def decode(pkt):
if "ModbusADU" in pkt:
pkt["ModbusADU"].show()
print("--------------------")
scapy.sniff(iface="lo", prn=decode)