Skip to content

Conversation

@nicokroe
Copy link

This PR aims at making the traffic identification for the IEC server more robust by looking exactly at the first byte of the incoming data. The following log entry shows that a HTTP request was falsely identified as IEC traffic:

2022-10-28 04:29:17,723 ('87.236.176.80', 46775) ---> i_frame C_RC_NA_1 with {'TypeID': 47, 'SQ': 0, 'NoO': 47, 'T': 0, 'PN': 1, 'COT': 41, 'OrigAddr': 110, 'COA': 25972} Objects=[{'IOA': 6647410, 'QOC': 29, 'RCS': 0}, {'load': b'-measurement.com/)\r\nConnection: close\r\nAccept: */*\r\nAccept-Encoding:'}]  (06728b7b-ea44-4a5c-9ece-157d1b8e48ac)

break
request += new_byte

# check if IEC 104 packet or for the first occurrence of the indication 0x68 for IEC 104
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be updated since you are not looking for the first occurrence anymore.

Copy link
Member

@glaslos glaslos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor doc string changes required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants