lin
2025-07-30 fcd736bf35fd93b563e9bbf594f2aa7b62028cc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% ProfinetIO layer test campaign
 
+ Syntax check
= Import the ProfinetIO layer
from scapy.contrib.pnio import *
 
 
+ Check DCE/RPC layer
 
= ProfinetIO default values
raw(ProfinetIO()) == b'\x00\x00'
 
= ProfinetIO overloads Ethertype
p = Ether() / ProfinetIO()
p.type == 0x8892
 
= ProfinetIO overloads UDP dport
p = UDP() / ProfinetIO()
p.dport == 0x8892
 
= Ether guesses ProfinetIO as payload class
p = Ether(hex_bytes('ffffffffffff00000000000088920102'))
p.payload.__class__ == ProfinetIO and p.frameID == 0x0102
 
= UDP guesses ProfinetIO as payload class
p = UDP(hex_bytes('12348892000a00000102'))
p.payload.__class__ == ProfinetIO and p.frameID == 0x0102
 
= ProfinetIO guess payload to PNIORealTime
p = UDP(hex_bytes('12348892000c000080020102'))
p.payload.payload.__class__.__name__ == 'PNIORealTime' and p.frameID == 0x8002