@deanhystad : I think that you are right about my problem with the binary2 function. Its the loop which causes problem.
How can I resolve this problem plz ?
Func_code contains certainely 3 and 1 values. He is its code:
How can I resolve this problem plz ?
Func_code contains certainely 3 and 1 values. He is its code:
def func_code(s): r = [] for p in s: if p.haslayer('ModbusADURequest'): try: if p['ModbusADURequest'][1].funcCode == 3: r.append(3) elif p['ModbusADURequest'][1].funcCode == 1: r.append(1) except AttributeError: pass