Skip to content

fix(s7commplus): restore V1 challenge wire layout - #841

Open
gijzelaerr wants to merge 3 commits into
masterfrom
fix-v1-sessionkey-challenge-layout
Open

fix(s7commplus): restore V1 challenge wire layout#841
gijzelaerr wants to merge 3 commits into
masterfrom
fix-v1-sessionkey-challenge-layout

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Summary

  • restore the V1 SessionKey GET_VAR_SUBSTREAMED challenge-request layout
  • encode the sequence field as VLQ and retain the three-byte fill used by the working S7-1200 capture
  • add capture-derived regression coverage and a changelog entry

Root cause

The final refactor in #775 reused the TLS/V2 substreamed request builder for the V1 SessionKey legitimation challenge. That changed the sequence field from a one-byte VLQ to a two-byte integer and changed the fill from three to four bytes.

In the latest #710 capture, the S7-1200 accepts SessionKey setup and session activation, rejects this two-byte-longer challenge request with a V254 system event, and resets the TCP connection. The corrected request matches the earlier capture that the same PLC accepted byte-for-byte.

Validation

  • full suite: 1814 passed, 78 skipped
  • targeted S7CommPlus V2/SessionKey tests: 58 passed
  • full pre-commit suite passed

Hardware validation requested

@xBiggs @bvanelli could you please test this branch on your S7-1200 hardware, especially the original s7commplus.Client().connect() plus browse() reproduction from #710? A db_read() / db_write() check would also be useful if convenient.

pip install --upgrade "python-snap7 @ git+https://github.com/gijzelaerr/python-snap7.git@fix-v1-sessionkey-challenge-layout"

Fixes #710.

@xBiggs

xBiggs commented Aug 19, 2026

Copy link
Copy Markdown

@gijzelaerr

browse():

DEBUG:snap7.connection:TCP connected to 192.168.0.1:102
DEBUG:snap7.connection:Sent COTP Connection Request
DEBUG:snap7.connection:Negotiated PDU size: 1024
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc1, length=2
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc2, length=16
DEBUG:snap7.connection:Received COTP Connection Confirm
INFO:snap7.connection:Connected to 192.168.0.1:102, PDU size: 1024
DEBUG:s7commplus.connection:=== InitSSL === sending (26 bytes): 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=38 payload (34 bytes): 02 f0 80 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== InitSSL === received (31 bytes): 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:InitSSL response: version=V1, data_length=23
DEBUG:s7commplus.connection:InitSSL response body (27 bytes): 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === sending (192 bytes): 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 199 bytes: 03 00 00 c7 02 f0 80 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=215 payload (211 bytes): 02 f0 80 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 10 1e 48 e9 79 28 91 a7 77 95 ef f1 67 f1 cd 9e 3a 10 e7 54 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === received (208 bytes): 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 10 1e 48 e9 79 28 91 a7 77 95 ef f1 67 f1 cd 9e 3a 10 e7 54 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response: version=V1, data_length=200
DEBUG:s7commplus.connection:CreateObject response body (204 bytes): 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 10 1e 48 e9 79 28 91 a7 77 95 ef f1 67 f1 cd 9e 3a 10 e7 54 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response header: opcode=0x32 function=0x04CA seq=1 transport=0x36
DEBUG:s7commplus.connection:CreateObject response: return_value=0 object_ids=['0x39b', '0x3c2']
DEBUG:s7commplus.connection:Session created: id=0x0000039B (923), version=V1
INFO:s7commplus.connection:ServerSessionVersion captured (84 bytes)
INFO:s7commplus.connection:Public key fingerprint captured: 01:BD426B091F08731A
INFO:s7commplus.connection:Session challenge captured (20 bytes): 101e48e9792891a77795eff167f1cd9e3a10e754
INFO:s7commplus.connection:SessionKey auth blob generated (180 bytes)
INFO:s7commplus.connection:SecurityKey blob included in session setup, IntegrityId tracking enabled
DEBUG:s7commplus.connection:=== SetupSession === sending (392 bytes): 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 2c ee 00 1e 3e 84 64 ef 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 5b 45 c1 4d aa 65 20 d7 ae 81 3d 52 af e5 65 5d db 93 31 b9 a6 c7 28 ec 3f 05 7b db de dc c0 57 9f a8 56 0c 5e 3a f7 89 70 db 8d d4 89 97 bb 76 3f e3 d4 b9 0e d2 12 ad 8b 02 32 39 90 92 9c c9 af de d2 81 a4 d7 7a 25 7c 2a c6 79 92 35 f2 34 7c 99 5f b1 b4 0a 9a 19 b8 80 18 a2 60 cd e0 43 02 8d db 25 01 d4 b8 a3 35 39 c3 64 f8 dc 63 98 ca 40 62 45 a1 4c 9c a8 f9 b1 64 d7 ac 75 08 69 1e 36 ed a2 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Sent 399 bytes: 03 00 01 8f 02 f0 80 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 2c ee 00 1e 3e 84 64 ef 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 5b 45 c1 4d aa 65 20 d7 ae 81 3d 52 af e5 65 5d db 93 31 b9 a6 c7 28 ec 3f 05 7b db de dc c0 57 9f a8 56 0c 5e 3a f7 89 70 db 8d d4 89 97 bb 76 3f e3 d4 b9 0e d2 12 ad 8b 02 32 39 90 92 9c c9 af de d2 81 a4 d7 7a 25 7c 2a c6 79 92 35 f2 34 7c 99 5f b1 b4 0a 9a 19 b8 80 18 a2 60 cd e0 43 02 8d db 25 01 d4 b8 a3 35 39 c3 64 f8 dc 63 98 ca 40 62 45 a1 4c 9c a8 f9 b1 64 d7 ac 75 08 69 1e 36 ed a2 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=32 payload (28 bytes): 02 f0 80 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:=== SetupSession === received (25 bytes): 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:SetupSession response: function=0x0542
INFO:s7commplus.connection:Session setup completed successfully
DEBUG:s7commplus.connection:Session activation: SET_VARIABLE addr 323 = USINT(5)
DEBUG:s7commplus.connection:  IntegrityId: write=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04F2 seq=3 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 18 ce 0a cd e0 30 c1 9e 52 bd 54 e9 5a 52 d7 5e f3 48 5e c2 61 b0 cc 43 7e d5 fe 95 77 9a fa 52 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 18 ce 0a cd e0 30 c1 9e 52 bd 54 e9 5a 52 d7 5e f3 48 5e c2 61 b0 cc 43 7e d5 fe 95 77 9a fa 52 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=64 payload (60 bytes): 02 f0 80 72 03 00 31 20 3b ce c8 a4 d7 db 77 65 94 d0 c0 39 66 de 83 ab 02 c5 4e 54 b5 e2 71 1b b9 b6 b8 c0 2a bf cb 7f 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (57 bytes): 72 03 00 31 20 3b ce c8 a4 d7 db 77 65 94 d0 c0 39 66 de 83 ab 02 c5 4e 54 b5 e2 71 1b b9 b6 b8 c0 2a bf cb 7f 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=49, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 3bcec8a4d7db776594d0c03966de83ab02c54e54b5e2711bb9b6b8c02abfcb7f
DEBUG:s7commplus.connection:  Response data (16 bytes): 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x04F2 seq=3 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (5 bytes): 06 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Session activation completed
DEBUG:s7commplus.connection:Post-auth legitimation: reading challenge from address 303
DEBUG:s7commplus.connection:  IntegrityId: read=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=4 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 04 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 09 98 f4 42 5f c2 5f 01 51 99 7d 3e db 09 48 77 72 a5 4f e2 45 ae 7f d5 dc f6 15 23 21 0c 1a 26 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 09 98 f4 42 5f c2 5f 01 51 99 7d 3e db 09 48 77 72 a5 4f e2 45 ae 7f d5 dc f6 15 23 21 0c 1a 26 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=88 payload (84 bytes): 02 f0 80 72 03 00 49 20 f0 6a 2c 9e 22 ef 6c 5f 82 0c 6f 2e f9 5f 84 f4 89 45 c3 49 9c e6 d6 bc 5e c4 a9 a3 ef 3f a3 50 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 f9 39 ea 1b 82 60 7b 4f 57 1d 5c 2b a7 a9 e1 53 71 f8 a7 82 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (81 bytes): 72 03 00 49 20 f0 6a 2c 9e 22 ef 6c 5f 82 0c 6f 2e f9 5f 84 f4 89 45 c3 49 9c e6 d6 bc 5e c4 a9 a3 ef 3f a3 50 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 f9 39 ea 1b 82 60 7b 4f 57 1d 5c 2b a7 a9 e1 53 71 f8 a7 82 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=73, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): f06a2c9e22ef6c5f820c6f2ef95f84f48945c3499ce6d6bc5ec4a9a3ef3fa350
DEBUG:s7commplus.connection:  Response data (40 bytes): 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 f9 39 ea 1b 82 60 7b 4f 57 1d 5c 2b a7 a9 e1 53 71 f8 a7 82 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x0586 seq=4 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (29 bytes): 00 10 02 14 f9 39 ea 1b 82 60 7b 4f 57 1d 5c 2b a7 a9 e1 53 71 f8 a7 82 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Legitimation blob generated (248 bytes)
DEBUG:s7commplus.connection:Post-auth legitimation: writing solved blob to address 1846
DEBUG:s7commplus.connection:  IntegrityId: write=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x057C seq=5 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (292 bytes): 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 84 22 de 11 33 df 5e ef 01 00 00 00 00 00 00 00 3c 00 00 00 24 7c d2 a7 43 d9 32 a5 09 c9 18 19 e5 56 17 4a 35 c8 d2 eb 5e e0 e8 56 44 62 85 49 c0 01 07 1b 50 e3 a3 bb ba 43 73 ab f7 02 ef 8b 84 a1 4d 52 4c d3 42 bb ee 6a c8 5e d2 78 ee 73 ef be ad de 00 00 00 00 40 00 00 00 be 93 98 70 d4 20 13 35 50 5f 90 21 6b f4 b6 99 4a 42 68 6f 2c d0 26 c1 b9 8e 9e 02 a4 f1 90 15 b9 bd 70 b5 8e 3c ec 88 08 51 a4 a4 1f 6e ee 16 48 5f 57 25 b5 05 91 41 6c 8c 65 50 72 1b 89 85 ef be ad de 01 00 00 00 18 00 00 00 af 95 42 0a 65 29 6c 01 6a ee 00 86 30 5d e9 ff 5e 2c da 85 fa ec 79 5e ef be ad de 02 00 00 00 00 00 00 00 05 00 00 00
DEBUG:s7commplus.connection:  Full frame (348 bytes): 72 03 01 54 20 fa ba f9 f7 2f b6 48 b2 3c 51 d5 31 97 7f 68 cd 75 10 c7 f1 f9 ef 5f f5 e8 14 90 46 32 6d 91 ba 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 84 22 de 11 33 df 5e ef 01 00 00 00 00 00 00 00 3c 00 00 00 24 7c d2 a7 43 d9 32 a5 09 c9 18 19 e5 56 17 4a 35 c8 d2 eb 5e e0 e8 56 44 62 85 49 c0 01 07 1b 50 e3 a3 bb ba 43 73 ab f7 02 ef 8b 84 a1 4d 52 4c d3 42 bb ee 6a c8 5e d2 78 ee 73 ef be ad de 00 00 00 00 40 00 00 00 be 93 98 70 d4 20 13 35 50 5f 90 21 6b f4 b6 99 4a 42 68 6f 2c d0 26 c1 b9 8e 9e 02 a4 f1 90 15 b9 bd 70 b5 8e 3c ec 88 08 51 a4 a4 1f 6e ee 16 48 5f 57 25 b5 05 91 41 6c 8c 65 50 72 1b 89 85 ef be ad de 01 00 00 00 18 00 00 00 af 95 42 0a 65 29 6c 01 6a ee 00 86 30 5d e9 ff 5e 2c da 85 fa ec 79 5e ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 355 bytes: 03 00 01 63 02 f0 80 72 03 01 54 20 fa ba f9 f7 2f b6 48 b2 3c 51 d5 31 97 7f 68 cd 75 10 c7 f1 f9 ef 5f f5 e8 14 90 46 32 6d 91 ba 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 84 22 de 11 33 df 5e ef 01 00 00 00 00 00 00 00 3c 00 00 00 24 7c d2 a7 43 d9 32 a5 09 c9 18 19 e5 56 17 4a 35 c8 d2 eb 5e e0 e8 56 44 62 85 49 c0 01 07 1b 50 e3 a3 bb ba 43 73 ab f7 02 ef 8b 84 a1 4d 52 4c d3 42 bb ee 6a c8 5e d2 78 ee 73 ef be ad de 00 00 00 00 40 00 00 00 be 93 98 70 d4 20 13 35 50 5f 90 21 6b f4 b6 99 4a 42 68 6f 2c d0 26 c1 b9 8e 9e 02 a4 f1 90 15 b9 bd 70 b5 8e 3c ec 88 08 51 a4 a4 1f 6e ee 16 48 5f 57 25 b5 05 91 41 6c 8c 65 50 72 1b 89 85 ef be ad de 01 00 00 00 18 00 00 00 af 95 42 0a 65 29 6c 01 6a ee 00 86 30 5d e9 ff 5e 2c da 85 fa ec 79 5e ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=27 payload (23 bytes): 02 f0 80 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (20 bytes): 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:  Frame header: version=V254, data_length=16, header_size=4
DEBUG:s7commplus.connection:  V254 frame: returning raw data (16 bytes)
DEBUG:s7commplus.connection:Legitimation write return_value=0x0
INFO:s7commplus.connection:Post-auth legitimation completed
INFO:s7commplus.connection:S7CommPlus connected to 192.168.0.1:102, version=V1, session=923, tls=False
DEBUG:s7commplus.connection:  IntegrityId: read=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04BB seq=6 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 bb 00 00 00 06 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (16 bytes): 8a 11 ff ff 00 01 00 01 00 00 0a 00 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (72 bytes): 72 03 00 40 20 6e c0 b6 7f 38 96 d5 7a ed 8f 38 b7 28 b1 cc fd 31 f4 3a 8e 3a ff d8 7e f0 c7 9a f8 3b 91 27 26 31 00 00 04 bb 00 00 00 06 00 00 03 9b 34 8a 11 ff ff 00 01 00 01 00 00 0a 01 00 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 79 bytes: 03 00 00 4f 02 f0 80 72 03 00 40 20 6e c0 b6 7f 38 96 d5 7a ed 8f 38 b7 28 b1 cc fd 31 f4 3a 8e 3a ff d8 7e f0 c7 9a f8 3b 91 27 26 31 00 00 04 bb 00 00 00 06 00 00 03 9b 34 8a 11 ff ff 00 01 00 01 00 00 0a 01 00 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=72 payload (68 bytes): 02 f0 80 72 03 00 39 20 20 d9 f3 d9 a4 a6 a3 f5 79 74 76 e9 e6 a6 c3 5e d3 3c c3 5a 69 df bc b4 13 5f 8e fb 00 fb 41 6c 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Reassembled response (57 bytes), payload 47 bytes
DEBUG:s7commplus.connection:  IntegrityId: read=2
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04BB seq=7 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 bb 00 00 00 07 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 02
DEBUG:s7commplus.connection:  Request payload (15 bytes): 00 00 02 19 00 01 01 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (71 bytes): 72 03 00 3f 20 7e ac ff a3 c5 5a 37 6d 0d 7c d3 e2 a5 f4 92 09 2f 8c 41 6c 53 b1 e6 b0 02 2c 79 a7 5c 6b cd 60 31 00 00 04 bb 00 00 00 07 00 00 03 9b 34 00 00 02 19 00 01 01 00 00 00 02 00 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 78 bytes: 03 00 00 4e 02 f0 80 72 03 00 3f 20 7e ac ff a3 c5 5a 37 6d 0d 7c d3 e2 a5 f4 92 09 2f 8c 41 6c 53 b1 e6 b0 02 2c 79 a7 5c 6b cd 60 31 00 00 04 bb 00 00 00 07 00 00 03 9b 34 00 00 02 19 00 01 01 00 00 00 02 00 00 00 00 00 72 03 00 00
INFO:s7commplus.client:Connection dropped by PLC (Receive error: [WinError 10054] An existing connection was forcibly closed by the remote host); reconnecting and retrying
INFO:snap7.connection:Disconnected from 192.168.0.1:102
DEBUG:snap7.connection:TCP connected to 192.168.0.1:102
DEBUG:snap7.connection:Sent COTP Connection Request
DEBUG:snap7.connection:Negotiated PDU size: 1024
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc1, length=2
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc2, length=16
DEBUG:snap7.connection:Received COTP Connection Confirm
INFO:snap7.connection:Connected to 192.168.0.1:102, PDU size: 1024
DEBUG:s7commplus.connection:=== InitSSL === sending (26 bytes): 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=38 payload (34 bytes): 02 f0 80 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== InitSSL === received (31 bytes): 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:InitSSL response: version=V1, data_length=23
DEBUG:s7commplus.connection:InitSSL response body (27 bytes): 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === sending (192 bytes): 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 199 bytes: 03 00 00 c7 02 f0 80 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=215 payload (211 bytes): 02 f0 80 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 dc 7e 90 54 b9 8e a4 ee 5a 70 1c ce 8f 4b 7a 36 15 7f b3 65 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === received (208 bytes): 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 dc 7e 90 54 b9 8e a4 ee 5a 70 1c ce 8f 4b 7a 36 15 7f b3 65 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response: version=V1, data_length=200
DEBUG:s7commplus.connection:CreateObject response body (204 bytes): 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 dc 7e 90 54 b9 8e a4 ee 5a 70 1c ce 8f 4b 7a 36 15 7f b3 65 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response header: opcode=0x32 function=0x04CA seq=1 transport=0x36
DEBUG:s7commplus.connection:CreateObject response: return_value=0 object_ids=['0x39b', '0x3c2']
DEBUG:s7commplus.connection:Session created: id=0x0000039B (923), version=V1
INFO:s7commplus.connection:ServerSessionVersion captured (84 bytes)
INFO:s7commplus.connection:Public key fingerprint captured: 01:BD426B091F08731A
INFO:s7commplus.connection:Session challenge captured (20 bytes): dc7e9054b98ea4ee5a701cce8f4b7a36157fb365
INFO:s7commplus.connection:SessionKey auth blob generated (180 bytes)
INFO:s7commplus.connection:SecurityKey blob included in session setup, IntegrityId tracking enabled
DEBUG:s7commplus.connection:=== SetupSession === sending (392 bytes): 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 cd 7c 85 4c 6f 03 c8 59 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 23 27 ec 41 be 27 94 c7 53 43 35 d3 8b 77 43 fd f4 de e6 9b 11 2f f3 0a 95 e8 ae b0 2a 10 21 ce ea ca cc 10 43 5b 3f ae a1 53 c7 84 27 e8 48 d2 e6 97 00 05 8c df b9 b7 94 b5 95 c7 2f 40 d1 a3 b5 51 f6 7a ec 61 09 ab 62 2d a1 78 42 e2 18 74 11 80 24 2b b9 05 53 04 e0 48 11 68 63 51 96 c6 ca b7 4b fd f9 17 55 21 45 89 78 bb 2a dc 5c 19 a1 e6 4b fb 56 a7 3b a0 de 60 75 ba 7a 32 ea 01 75 be 5c b0 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Sent 399 bytes: 03 00 01 8f 02 f0 80 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 cd 7c 85 4c 6f 03 c8 59 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 23 27 ec 41 be 27 94 c7 53 43 35 d3 8b 77 43 fd f4 de e6 9b 11 2f f3 0a 95 e8 ae b0 2a 10 21 ce ea ca cc 10 43 5b 3f ae a1 53 c7 84 27 e8 48 d2 e6 97 00 05 8c df b9 b7 94 b5 95 c7 2f 40 d1 a3 b5 51 f6 7a ec 61 09 ab 62 2d a1 78 42 e2 18 74 11 80 24 2b b9 05 53 04 e0 48 11 68 63 51 96 c6 ca b7 4b fd f9 17 55 21 45 89 78 bb 2a dc 5c 19 a1 e6 4b fb 56 a7 3b a0 de 60 75 ba 7a 32 ea 01 75 be 5c b0 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=32 payload (28 bytes): 02 f0 80 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:=== SetupSession === received (25 bytes): 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:SetupSession response: function=0x0542
INFO:s7commplus.connection:Session setup completed successfully
DEBUG:s7commplus.connection:Session activation: SET_VARIABLE addr 323 = USINT(5)
DEBUG:s7commplus.connection:  IntegrityId: write=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04F2 seq=3 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 0c f4 d4 9e af 37 b8 17 da 73 be de 21 fb f7 80 fb ec cf 52 77 98 91 cb 43 cd 1a 6c e0 e3 88 fe 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 0c f4 d4 9e af 37 b8 17 da 73 be de 21 fb f7 80 fb ec cf 52 77 98 91 cb 43 cd 1a 6c e0 e3 88 fe 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=64 payload (60 bytes): 02 f0 80 72 03 00 31 20 29 cc 84 c1 dd 0d f6 82 f5 ae 01 90 78 e5 28 d3 f4 21 66 41 b7 bd 75 5c 1d 99 75 1f e6 74 27 8d 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (57 bytes): 72 03 00 31 20 29 cc 84 c1 dd 0d f6 82 f5 ae 01 90 78 e5 28 d3 f4 21 66 41 b7 bd 75 5c 1d 99 75 1f e6 74 27 8d 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=49, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 29cc84c1dd0df682f5ae019078e528d3f4216641b7bd755c1d99751fe674278d
DEBUG:s7commplus.connection:  Response data (16 bytes): 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x04F2 seq=3 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (5 bytes): 06 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Session activation completed
DEBUG:s7commplus.connection:Post-auth legitimation: reading challenge from address 303
DEBUG:s7commplus.connection:  IntegrityId: read=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=4 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 04 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 b1 13 6a 2f e9 ff ec 1c f9 06 1f 61 7e fe 8b 5d f6 56 24 55 d0 c2 16 ef 48 05 86 3b 6a 78 cc d8 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 b1 13 6a 2f e9 ff ec 1c f9 06 1f 61 7e fe 8b 5d f6 56 24 55 d0 c2 16 ef 48 05 86 3b 6a 78 cc d8 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=88 payload (84 bytes): 02 f0 80 72 03 00 49 20 cc fb cd 58 47 6f 16 dc 86 58 36 4a be 6c 65 90 d9 63 a5 32 1e 4f 0a 29 63 0d ec 2c 9b 26 0d 37 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 ad a0 a5 99 07 d3 c8 09 b8 bd 45 cf bc ed 25 e1 d3 cd be cf 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (81 bytes): 72 03 00 49 20 cc fb cd 58 47 6f 16 dc 86 58 36 4a be 6c 65 90 d9 63 a5 32 1e 4f 0a 29 63 0d ec 2c 9b 26 0d 37 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 ad a0 a5 99 07 d3 c8 09 b8 bd 45 cf bc ed 25 e1 d3 cd be cf 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=73, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): ccfbcd58476f16dc8658364abe6c6590d963a5321e4f0a29630dec2c9b260d37
DEBUG:s7commplus.connection:  Response data (40 bytes): 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 ad a0 a5 99 07 d3 c8 09 b8 bd 45 cf bc ed 25 e1 d3 cd be cf 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x0586 seq=4 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (29 bytes): 00 10 02 14 ad a0 a5 99 07 d3 c8 09 b8 bd 45 cf bc ed 25 e1 d3 cd be cf 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Legitimation blob generated (248 bytes)
DEBUG:s7commplus.connection:Post-auth legitimation: writing solved blob to address 1846
DEBUG:s7commplus.connection:  IntegrityId: write=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x057C seq=5 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (292 bytes): 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 c5 35 38 ea 00 18 93 a8 01 00 00 00 00 00 00 00 3c 00 00 00 3e ad 48 65 0c 52 44 a6 34 e1 c2 e6 af cb 37 f7 6b 82 c5 f5 0b e2 a4 50 68 8f ee 3b 4b fd f3 47 98 ee e4 f1 55 15 ea 49 ce d0 27 8b f3 db 26 07 8b 0b 1d 9a e5 4e 49 a6 ca 81 5b 5b ef be ad de 00 00 00 00 40 00 00 00 6a 0f 74 67 fc 40 dd 83 7a b9 ee ba 0b 78 9f d1 c7 31 f2 9a be 74 33 1f 78 6d 28 e2 18 38 ee 8d 50 54 df d3 41 9d 87 62 55 c8 8c 9a 2a f9 5e ff c8 bc c5 c8 2a ce f5 da 19 08 1e d5 12 bb 79 22 ef be ad de 01 00 00 00 18 00 00 00 cd 53 03 83 5b d0 c0 7f 31 20 e5 9b 97 a4 4c 1e c1 5b 4e 63 d0 6d 61 2a ef be ad de 02 00 00 00 00 00 00 00 05 00 00 00
DEBUG:s7commplus.connection:  Full frame (348 bytes): 72 03 01 54 20 cb 3e b3 28 67 d6 e2 72 47 7c 87 4a c8 1a 40 de 83 44 b9 06 2f 2c 9a 7b 60 9a 13 11 84 6b e5 51 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 c5 35 38 ea 00 18 93 a8 01 00 00 00 00 00 00 00 3c 00 00 00 3e ad 48 65 0c 52 44 a6 34 e1 c2 e6 af cb 37 f7 6b 82 c5 f5 0b e2 a4 50 68 8f ee 3b 4b fd f3 47 98 ee e4 f1 55 15 ea 49 ce d0 27 8b f3 db 26 07 8b 0b 1d 9a e5 4e 49 a6 ca 81 5b 5b ef be ad de 00 00 00 00 40 00 00 00 6a 0f 74 67 fc 40 dd 83 7a b9 ee ba 0b 78 9f d1 c7 31 f2 9a be 74 33 1f 78 6d 28 e2 18 38 ee 8d 50 54 df d3 41 9d 87 62 55 c8 8c 9a 2a f9 5e ff c8 bc c5 c8 2a ce f5 da 19 08 1e d5 12 bb 79 22 ef be ad de 01 00 00 00 18 00 00 00 cd 53 03 83 5b d0 c0 7f 31 20 e5 9b 97 a4 4c 1e c1 5b 4e 63 d0 6d 61 2a ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 355 bytes: 03 00 01 63 02 f0 80 72 03 01 54 20 cb 3e b3 28 67 d6 e2 72 47 7c 87 4a c8 1a 40 de 83 44 b9 06 2f 2c 9a 7b 60 9a 13 11 84 6b e5 51 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 c5 35 38 ea 00 18 93 a8 01 00 00 00 00 00 00 00 3c 00 00 00 3e ad 48 65 0c 52 44 a6 34 e1 c2 e6 af cb 37 f7 6b 82 c5 f5 0b e2 a4 50 68 8f ee 3b 4b fd f3 47 98 ee e4 f1 55 15 ea 49 ce d0 27 8b f3 db 26 07 8b 0b 1d 9a e5 4e 49 a6 ca 81 5b 5b ef be ad de 00 00 00 00 40 00 00 00 6a 0f 74 67 fc 40 dd 83 7a b9 ee ba 0b 78 9f d1 c7 31 f2 9a be 74 33 1f 78 6d 28 e2 18 38 ee 8d 50 54 df d3 41 9d 87 62 55 c8 8c 9a 2a f9 5e ff c8 bc c5 c8 2a ce f5 da 19 08 1e d5 12 bb 79 22 ef be ad de 01 00 00 00 18 00 00 00 cd 53 03 83 5b d0 c0 7f 31 20 e5 9b 97 a4 4c 1e c1 5b 4e 63 d0 6d 61 2a ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=27 payload (23 bytes): 02 f0 80 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (20 bytes): 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:  Frame header: version=V254, data_length=16, header_size=4
DEBUG:s7commplus.connection:  V254 frame: returning raw data (16 bytes)
DEBUG:s7commplus.connection:Legitimation write return_value=0x0
INFO:s7commplus.connection:Post-auth legitimation completed
INFO:s7commplus.connection:S7CommPlus connected to 192.168.0.1:102, version=V1, session=923, tls=False
DEBUG:s7commplus.connection:  IntegrityId: read=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04BB seq=6 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 bb 00 00 00 06 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (15 bytes): 00 00 02 19 00 01 01 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (71 bytes): 72 03 00 3f 20 c7 9f 7e 23 bf aa 3f 8f 73 ce 8a ff fe c4 76 69 98 45 c8 91 23 e7 a8 67 d1 eb 2a 01 a1 b5 bb 44 31 00 00 04 bb 00 00 00 06 00 00 03 9b 34 00 00 02 19 00 01 01 00 00 00 01 00 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 78 bytes: 03 00 00 4e 02 f0 80 72 03 00 3f 20 c7 9f 7e 23 bf aa 3f 8f 73 ce 8a ff fe c4 76 69 98 45 c8 91 23 e7 a8 67 d1 eb 2a 01 a1 b5 bb 44 31 00 00 04 bb 00 00 00 06 00 00 03 9b 34 00 00 02 19 00 01 01 00 00 00 01 00 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=72 payload (68 bytes): 02 f0 80 72 03 00 39 20 16 40 61 a3 b8 8e 17 df 96 15 f2 b7 3c 41 e1 58 ea 47 8d db 2b cc dc 1f fe fb 89 3e ac f1 55 99 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Reassembled response (57 bytes), payload 47 bytes
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 04 d4 00 00 00 07 00 00 03 9b 36 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=209 payload (205 bytes): 02 f0 80 72 fe 00 c6 00 00 00 00 00 00 04 89 00 00 00 00 00 00 00 00 00 00 00 17 00 00 9d 6c 00 00 9d 6d 00 00 00 08 00 00 00 02 00 00 9d 6e 00 00 00 04 00 00 03 9b 00 00 9d 6f 00 00 00 04 00 00 04 bb 00 00 9d 70 00 00 00 03 00 06 00 00 9d 71 00 00 00 09 a2 01 3b 00 02 36 ff 88 00 00 9d 72 00 00 00 04 00 00 00 00 00 00 9d 73 00 00 00 04 00 00 04 bb 00 00 9d 74 00 00 00 04 00 00 00 e9 00 00 9d 75 00 00 00 04 00 00 00 00 00 00 9d 76 00 00 00 03 00 06 00 00 9d 77 00 00 00 03 00 00 00 00 9d 78 00 00 00 03 10 00 00 00 9d 79 00 00 00 03 10 11 00 00 9d 7a 00 00 00 03 08 01 00 00 9d 7b 00 00 00 03 10 29 00 00 00 00
INFO:snap7.connection:Disconnected from 192.168.0.1:102
[]

browse.zip

db_read():

DEBUG:snap7.connection:TCP connected to 192.168.0.1:102
DEBUG:snap7.connection:Sent COTP Connection Request
DEBUG:snap7.connection:Negotiated PDU size: 1024
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc1, length=2
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc2, length=16
DEBUG:snap7.connection:Received COTP Connection Confirm
INFO:snap7.connection:Connected to 192.168.0.1:102, PDU size: 1024
DEBUG:s7commplus.connection:=== InitSSL === sending (26 bytes): 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=38 payload (34 bytes): 02 f0 80 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== InitSSL === received (31 bytes): 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:InitSSL response: version=V1, data_length=23
DEBUG:s7commplus.connection:InitSSL response body (27 bytes): 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === sending (192 bytes): 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 199 bytes: 03 00 00 c7 02 f0 80 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=215 payload (211 bytes): 02 f0 80 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 c0 95 57 cb 4b 3e f8 61 c7 68 97 77 0d 91 2b 6a 5a bb 87 ec a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === received (208 bytes): 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 c0 95 57 cb 4b 3e f8 61 c7 68 97 77 0d 91 2b 6a 5a bb 87 ec a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response: version=V1, data_length=200
DEBUG:s7commplus.connection:CreateObject response body (204 bytes): 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 c0 95 57 cb 4b 3e f8 61 c7 68 97 77 0d 91 2b 6a 5a bb 87 ec a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response header: opcode=0x32 function=0x04CA seq=1 transport=0x36
DEBUG:s7commplus.connection:CreateObject response: return_value=0 object_ids=['0x39b', '0x3c2']
DEBUG:s7commplus.connection:Session created: id=0x0000039B (923), version=V1
INFO:s7commplus.connection:ServerSessionVersion captured (84 bytes)
INFO:s7commplus.connection:Public key fingerprint captured: 01:BD426B091F08731A
INFO:s7commplus.connection:Session challenge captured (20 bytes): c09557cb4b3ef861c76897770d912b6a5abb87ec
INFO:s7commplus.connection:SessionKey auth blob generated (180 bytes)
INFO:s7commplus.connection:SecurityKey blob included in session setup, IntegrityId tracking enabled
DEBUG:s7commplus.connection:=== SetupSession === sending (392 bytes): 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 c6 95 2b 63 dd c0 2a e0 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 94 ac c2 68 e5 af e5 b6 47 ee 70 1d 8e 0e a9 69 34 61 e6 fa 5f 14 a3 06 2f b0 47 40 cc 47 4d d7 7d 92 f3 43 d8 55 7e 7e 12 c5 18 53 89 96 24 f3 ac 4e c5 27 8a 89 c3 66 69 d4 d4 63 ef 50 bc 54 0c b1 ec 7e be 78 25 bb bf 7d 32 37 b4 a6 b5 35 e2 04 bc e4 06 35 ae de a0 78 bd 2b 3b 23 27 0a 42 0b da 70 e7 2f 13 eb 24 90 d0 9c 43 ce 50 0f 8d 54 03 ce 25 f9 fd 5b cd 9a 78 3b b1 67 ea fb 27 5b 2b 3b 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Sent 399 bytes: 03 00 01 8f 02 f0 80 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 c6 95 2b 63 dd c0 2a e0 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 94 ac c2 68 e5 af e5 b6 47 ee 70 1d 8e 0e a9 69 34 61 e6 fa 5f 14 a3 06 2f b0 47 40 cc 47 4d d7 7d 92 f3 43 d8 55 7e 7e 12 c5 18 53 89 96 24 f3 ac 4e c5 27 8a 89 c3 66 69 d4 d4 63 ef 50 bc 54 0c b1 ec 7e be 78 25 bb bf 7d 32 37 b4 a6 b5 35 e2 04 bc e4 06 35 ae de a0 78 bd 2b 3b 23 27 0a 42 0b da 70 e7 2f 13 eb 24 90 d0 9c 43 ce 50 0f 8d 54 03 ce 25 f9 fd 5b cd 9a 78 3b b1 67 ea fb 27 5b 2b 3b 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=32 payload (28 bytes): 02 f0 80 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:=== SetupSession === received (25 bytes): 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:SetupSession response: function=0x0542
INFO:s7commplus.connection:Session setup completed successfully
DEBUG:s7commplus.connection:Session activation: SET_VARIABLE addr 323 = USINT(5)
DEBUG:s7commplus.connection:  IntegrityId: write=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04F2 seq=3 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 7b 05 74 7e 1f 81 40 52 8f 07 c6 af 94 aa 55 a5 5c cf 05 58 5d 6c 00 8c 45 60 20 91 35 d6 a7 92 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 7b 05 74 7e 1f 81 40 52 8f 07 c6 af 94 aa 55 a5 5c cf 05 58 5d 6c 00 8c 45 60 20 91 35 d6 a7 92 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=64 payload (60 bytes): 02 f0 80 72 03 00 31 20 ec a6 c5 a1 c3 07 47 44 57 09 69 19 64 e1 7f 38 e9 f8 c4 e7 eb 4c ed ca 21 f0 38 c9 b3 c2 4e 6d 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (57 bytes): 72 03 00 31 20 ec a6 c5 a1 c3 07 47 44 57 09 69 19 64 e1 7f 38 e9 f8 c4 e7 eb 4c ed ca 21 f0 38 c9 b3 c2 4e 6d 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=49, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): eca6c5a1c30747445709691964e17f38e9f8c4e7eb4cedca21f038c9b3c24e6d
DEBUG:s7commplus.connection:  Response data (16 bytes): 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x04F2 seq=3 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (5 bytes): 06 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Session activation completed
DEBUG:s7commplus.connection:Post-auth legitimation: reading challenge from address 303
DEBUG:s7commplus.connection:  IntegrityId: read=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=4 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 04 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 96 86 e4 f6 4d 1e 40 8c 35 e2 27 46 e0 59 b8 6b 75 fa e1 2d 67 8f 1a 9b 21 ff cc f1 65 76 a5 34 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 96 86 e4 f6 4d 1e 40 8c 35 e2 27 46 e0 59 b8 6b 75 fa e1 2d 67 8f 1a 9b 21 ff cc f1 65 76 a5 34 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=88 payload (84 bytes): 02 f0 80 72 03 00 49 20 28 f8 47 25 df 96 dc f9 e9 0d 68 d9 c8 5b bb db 88 14 ef 69 6d db 2c f6 74 01 89 1b 4e af f3 45 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 ab 73 a7 7f 2a 9b 80 8b 98 5f 75 5d 64 3d 9d 7f b0 04 44 ba 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (81 bytes): 72 03 00 49 20 28 f8 47 25 df 96 dc f9 e9 0d 68 d9 c8 5b bb db 88 14 ef 69 6d db 2c f6 74 01 89 1b 4e af f3 45 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 ab 73 a7 7f 2a 9b 80 8b 98 5f 75 5d 64 3d 9d 7f b0 04 44 ba 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=73, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 28f84725df96dcf9e90d68d9c85bbbdb8814ef696ddb2cf67401891b4eaff345
DEBUG:s7commplus.connection:  Response data (40 bytes): 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 ab 73 a7 7f 2a 9b 80 8b 98 5f 75 5d 64 3d 9d 7f b0 04 44 ba 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x0586 seq=4 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (29 bytes): 00 10 02 14 ab 73 a7 7f 2a 9b 80 8b 98 5f 75 5d 64 3d 9d 7f b0 04 44 ba 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Legitimation blob generated (248 bytes)
DEBUG:s7commplus.connection:Post-auth legitimation: writing solved blob to address 1846
DEBUG:s7commplus.connection:  IntegrityId: write=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x057C seq=5 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (292 bytes): 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 40 ca 45 1c 69 41 f3 6d 01 00 00 00 00 00 00 00 3c 00 00 00 8e 76 21 cd 9e 7f f1 6f 74 c4 87 6c 1b c8 2d e1 ff b9 1b 95 88 47 2c cc 66 5c 39 aa 14 c5 d8 13 2d fc 5c 90 9a ef 2e de 3a 37 6c f8 da b0 f4 8f 09 79 d9 e9 48 f0 8a 15 da 33 a3 e8 ef be ad de 00 00 00 00 40 00 00 00 ab c8 0a 67 2f c0 e8 ee 84 8d 15 77 de 26 b9 d1 ac 58 62 3e fd aa a8 2c 73 ea 33 39 c1 08 17 6f 65 cd 0f 7c 47 8d 61 42 03 d3 d0 59 31 8a 26 c1 6e 31 b2 d5 79 3f c9 6f 1e f4 13 33 75 5e c1 19 ef be ad de 01 00 00 00 18 00 00 00 48 e2 28 61 86 be 10 d7 b4 4a e1 9e 23 aa 7f 48 c3 3c 5f e3 2f ec 7c 5f ef be ad de 02 00 00 00 00 00 00 00 05 00 00 00
DEBUG:s7commplus.connection:  Full frame (348 bytes): 72 03 01 54 20 72 54 dc 50 4b 11 f8 96 eb 91 8b 60 15 18 24 92 92 f7 4d ee ef b3 85 0f 17 8e fd 84 b0 f8 ca 9d 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 40 ca 45 1c 69 41 f3 6d 01 00 00 00 00 00 00 00 3c 00 00 00 8e 76 21 cd 9e 7f f1 6f 74 c4 87 6c 1b c8 2d e1 ff b9 1b 95 88 47 2c cc 66 5c 39 aa 14 c5 d8 13 2d fc 5c 90 9a ef 2e de 3a 37 6c f8 da b0 f4 8f 09 79 d9 e9 48 f0 8a 15 da 33 a3 e8 ef be ad de 00 00 00 00 40 00 00 00 ab c8 0a 67 2f c0 e8 ee 84 8d 15 77 de 26 b9 d1 ac 58 62 3e fd aa a8 2c 73 ea 33 39 c1 08 17 6f 65 cd 0f 7c 47 8d 61 42 03 d3 d0 59 31 8a 26 c1 6e 31 b2 d5 79 3f c9 6f 1e f4 13 33 75 5e c1 19 ef be ad de 01 00 00 00 18 00 00 00 48 e2 28 61 86 be 10 d7 b4 4a e1 9e 23 aa 7f 48 c3 3c 5f e3 2f ec 7c 5f ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 355 bytes: 03 00 01 63 02 f0 80 72 03 01 54 20 72 54 dc 50 4b 11 f8 96 eb 91 8b 60 15 18 24 92 92 f7 4d ee ef b3 85 0f 17 8e fd 84 b0 f8 ca 9d 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 40 ca 45 1c 69 41 f3 6d 01 00 00 00 00 00 00 00 3c 00 00 00 8e 76 21 cd 9e 7f f1 6f 74 c4 87 6c 1b c8 2d e1 ff b9 1b 95 88 47 2c cc 66 5c 39 aa 14 c5 d8 13 2d fc 5c 90 9a ef 2e de 3a 37 6c f8 da b0 f4 8f 09 79 d9 e9 48 f0 8a 15 da 33 a3 e8 ef be ad de 00 00 00 00 40 00 00 00 ab c8 0a 67 2f c0 e8 ee 84 8d 15 77 de 26 b9 d1 ac 58 62 3e fd aa a8 2c 73 ea 33 39 c1 08 17 6f 65 cd 0f 7c 47 8d 61 42 03 d3 d0 59 31 8a 26 c1 6e 31 b2 d5 79 3f c9 6f 1e f4 13 33 75 5e c1 19 ef be ad de 01 00 00 00 18 00 00 00 48 e2 28 61 86 be 10 d7 b4 4a e1 9e 23 aa 7f 48 c3 3c 5f e3 2f ec 7c 5f ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=27 payload (23 bytes): 02 f0 80 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (20 bytes): 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:  Frame header: version=V254, data_length=16, header_size=4
DEBUG:s7commplus.connection:  V254 frame: returning raw data (16 bytes)
DEBUG:s7commplus.connection:Legitimation write return_value=0x0
INFO:s7commplus.connection:Post-auth legitimation completed
INFO:s7commplus.connection:S7CommPlus connected to 192.168.0.1:102, version=V1, session=923, tls=False
DEBUG:s7commplus.connection:  IntegrityId: read=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x054C seq=6 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 4c 00 00 00 06 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (47 bytes): 00 00 00 00 01 06 00 88 d0 b8 80 07 03 93 76 01 02 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 01 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (103 bytes): 72 03 00 5f 20 7e f2 c2 2d 41 1a 33 99 22 8f 6b 7b 78 61 75 38 bf c2 5d a2 47 b0 90 cf 43 94 e2 18 63 48 00 4b 31 00 00 05 4c 00 00 00 06 00 00 03 9b 34 00 00 00 00 01 06 00 88 d0 b8 80 07 03 93 76 01 02 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 110 bytes: 03 00 00 6e 02 f0 80 72 03 00 5f 20 7e f2 c2 2d 41 1a 33 99 22 8f 6b 7b 78 61 75 38 bf c2 5d a2 47 b0 90 cf 43 94 e2 18 63 48 00 4b 31 00 00 05 4c 00 00 00 06 00 00 03 9b 34 00 00 00 00 01 06 00 88 d0 b8 80 07 03 93 76 01 02 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=72 payload (68 bytes): 02 f0 80 72 03 00 39 20 9e 47 cc 3d f2 84 c4 77 07 ad 74 47 72 be 4e cb 6c ac 81 55 95 6c 44 ef c7 67 57 f9 65 f0 b9 8e 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (65 bytes): 72 03 00 39 20 9e 47 cc 3d f2 84 c4 77 07 ad 74 47 72 be 4e cb 6c ac 81 55 95 6c 44 ef c7 67 57 f9 65 f0 b9 8e 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=57, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 9e47cc3df284c47707ad744772be4ecb6cac8155956c44efc76757f965f0b98e
DEBUG:s7commplus.connection:  Response data (24 bytes): 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x057C seq=5 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 17595385856 (5 bytes)
DEBUG:s7commplus.connection:  Response payload (9 bytes): 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
ERROR:s7commplus.client:_parse_read_response: PLC returned error 0x6CFFFF05
Traceback (most recent call last):
  File "\python-snap7-fix-v1-sessionkey-challenge-layout\main.py", line 9, in <module>
    variables = client.db_read(7, 0, 2)
  File "\python-snap7-fix-v1-sessionkey-challenge-layout\s7commplus\client.py", line 181, in db_read
    raise RuntimeError("Read returned no data")
RuntimeError: Read returned no data

db_read.zip

@bvanelli

Copy link
Copy Markdown
Contributor

@gijzelaerr we unfortunatelly don't have any PLC that supports the V1 protocol. I get:

INFO s7commplus.connection: S7CommPlus connected to 192.168.101.53:102, version=V2, session=1879052252, tls=True

which means the protocol version is V2 (I assume). However, I tested the branch with the three S7-1500 plcs and they all worked for a browse + variable read.

@gijzelaerr

Copy link
Copy Markdown
Owner Author

@xBiggs @bvanelli I pushed follow-up fixes for the captured V1 response handling: non-fatal V254 SystemEvents are now consumed while waiting for the matching sequence, and fragmented V3 responses have their per-fragment HMAC removed before reassembly.

@xBiggs, could you please retest this branch on the original S7-1200 FW V4.2 reproduction (connect(), browse(), and if possible db_read()/db_write())? Given your S7-1500 < FW 2.9 report, a run there would also be valuable. For that PLC, please include a decrypted/log trace from the SessionKey SET_MULTI_VARIABLES through the additional SET_VARIABLE and subsequent GET_VAR_SUBSTREAMED/SecurityDisconnect. That will let us determine a safe model/firmware condition instead of guessing.

Install:

pip install --upgrade "python-snap7 @ git+https://github.com/gijzelaerr/python-snap7.git@fix-v1-sessionkey-challenge-layout"

Local validation is green: 1,827 passed, 78 skipped, with the full pre-commit suite passing.

@xBiggs

xBiggs commented Aug 20, 2026

Copy link
Copy Markdown

@gijzelaerr

1200 browse():

DEBUG:snap7.connection:TCP connected to 192.168.0.1:102
DEBUG:snap7.connection:Sent COTP Connection Request
DEBUG:snap7.connection:Negotiated PDU size: 1024
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc1, length=2
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc2, length=16
DEBUG:snap7.connection:Received COTP Connection Confirm
INFO:snap7.connection:Connected to 192.168.0.1:102, PDU size: 1024
DEBUG:s7commplus.connection:=== InitSSL === sending (26 bytes): 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=38 payload (34 bytes): 02 f0 80 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== InitSSL === received (31 bytes): 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:InitSSL response: version=V1, data_length=23
DEBUG:s7commplus.connection:InitSSL response body (27 bytes): 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === sending (192 bytes): 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 199 bytes: 03 00 00 c7 02 f0 80 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=215 payload (211 bytes): 02 f0 80 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 dc c0 c4 11 09 6a bc 4a 31 48 dd 32 fc cc 3f 9a a4 cc 5a 4e a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === received (208 bytes): 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 dc c0 c4 11 09 6a bc 4a 31 48 dd 32 fc cc 3f 9a a4 cc 5a 4e a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response: version=V1, data_length=200
DEBUG:s7commplus.connection:CreateObject response body (204 bytes): 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 dc c0 c4 11 09 6a bc 4a 31 48 dd 32 fc cc 3f 9a a4 cc 5a 4e a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response header: opcode=0x32 function=0x04CA seq=1 transport=0x36
DEBUG:s7commplus.connection:CreateObject response: return_value=0 object_ids=['0x39b', '0x3c2']
DEBUG:s7commplus.connection:Session created: id=0x0000039B (923), version=V1
INFO:s7commplus.connection:ServerSessionVersion captured (84 bytes)
INFO:s7commplus.connection:Public key fingerprint captured: 01:BD426B091F08731A
INFO:s7commplus.connection:Session challenge captured (20 bytes): dcc0c411096abc4a3148dd32fccc3f9aa4cc5a4e
INFO:s7commplus.connection:SessionKey auth blob generated (180 bytes)
INFO:s7commplus.connection:SecurityKey blob included in session setup, IntegrityId tracking enabled
DEBUG:s7commplus.connection:=== SetupSession === sending (392 bytes): 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 66 e5 cc 58 03 fa 01 41 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 0c e8 44 d6 cf 1f 0c 06 2f 64 de 4a 1a 69 e1 fe b5 e9 8b f4 7e f9 84 48 22 cc e0 c1 a7 50 ec 97 82 eb e1 20 4b 20 ce 22 a1 97 55 c4 f8 a5 01 68 8f 26 06 a4 a1 22 0f 6e 34 b4 b1 da 74 c8 f8 0d 4c 86 f4 48 8e 80 92 3a 23 40 7f 21 8b aa d6 55 cb 81 c9 8f 74 ed 7d 75 12 78 e6 62 a3 2a 1c 4c e3 4e 4a 5b 8a c0 98 fc 5c 6b cf 66 51 ca eb 8c 49 0d f1 29 54 6b 31 12 e2 d3 2d fa 07 30 10 78 f6 a6 24 0d 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Sent 399 bytes: 03 00 01 8f 02 f0 80 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 66 e5 cc 58 03 fa 01 41 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 0c e8 44 d6 cf 1f 0c 06 2f 64 de 4a 1a 69 e1 fe b5 e9 8b f4 7e f9 84 48 22 cc e0 c1 a7 50 ec 97 82 eb e1 20 4b 20 ce 22 a1 97 55 c4 f8 a5 01 68 8f 26 06 a4 a1 22 0f 6e 34 b4 b1 da 74 c8 f8 0d 4c 86 f4 48 8e 80 92 3a 23 40 7f 21 8b aa d6 55 cb 81 c9 8f 74 ed 7d 75 12 78 e6 62 a3 2a 1c 4c e3 4e 4a 5b 8a c0 98 fc 5c 6b cf 66 51 ca eb 8c 49 0d f1 29 54 6b 31 12 e2 d3 2d fa 07 30 10 78 f6 a6 24 0d 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=32 payload (28 bytes): 02 f0 80 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:=== SetupSession === received (25 bytes): 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:SetupSession response: function=0x0542
INFO:s7commplus.connection:Session setup completed successfully
DEBUG:s7commplus.connection:Session activation: SET_VARIABLE addr 323 = USINT(5)
DEBUG:s7commplus.connection:  IntegrityId: write=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04F2 seq=3 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 bf 31 ac d7 ee b0 81 62 72 80 3e 66 0b 3e ba f5 80 10 8d d1 13 d7 93 62 b0 d4 b5 76 5e 5f 70 b2 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 bf 31 ac d7 ee b0 81 62 72 80 3e 66 0b 3e ba f5 80 10 8d d1 13 d7 93 62 b0 d4 b5 76 5e 5f 70 b2 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=64 payload (60 bytes): 02 f0 80 72 03 00 31 20 01 af 7d de 4d 63 ae 4f c9 32 f0 72 72 45 a0 a6 29 31 ad 4f be 13 17 ca 97 c9 04 50 b9 cc c8 86 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (57 bytes): 72 03 00 31 20 01 af 7d de 4d 63 ae 4f c9 32 f0 72 72 45 a0 a6 29 31 ad 4f be 13 17 ca 97 c9 04 50 b9 cc c8 86 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=49, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 01af7dde4d63ae4fc932f0727245a0a62931ad4fbe1317ca97c90450b9ccc886
DEBUG:s7commplus.connection:  Response data (16 bytes): 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x04F2 seq=3 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (5 bytes): 06 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Session activation completed
DEBUG:s7commplus.connection:Post-auth legitimation: reading challenge from address 303
DEBUG:s7commplus.connection:  IntegrityId: read=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=4 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 04 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 f3 c2 a3 a2 f6 04 6a 84 6a 49 42 af 4b 82 68 2a 0e fb ee fd f0 a6 eb 96 f4 94 e6 a1 aa 63 77 18 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 f3 c2 a3 a2 f6 04 6a 84 6a 49 42 af 4b 82 68 2a 0e fb ee fd f0 a6 eb 96 f4 94 e6 a1 aa 63 77 18 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=88 payload (84 bytes): 02 f0 80 72 03 00 49 20 57 46 d5 ba 44 40 ee dc b9 4b 27 b3 c9 33 a4 8a 8f a0 0d d2 68 a2 64 33 00 9b 14 20 6d 1a ad ae 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 4b 45 d9 d0 52 11 68 90 b2 ad da 87 45 62 c7 b9 8b a2 56 cf 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (81 bytes): 72 03 00 49 20 57 46 d5 ba 44 40 ee dc b9 4b 27 b3 c9 33 a4 8a 8f a0 0d d2 68 a2 64 33 00 9b 14 20 6d 1a ad ae 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 4b 45 d9 d0 52 11 68 90 b2 ad da 87 45 62 c7 b9 8b a2 56 cf 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=73, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 5746d5ba4440eedcb94b27b3c933a48a8fa00dd268a26433009b14206d1aadae
DEBUG:s7commplus.connection:  Response data (40 bytes): 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 4b 45 d9 d0 52 11 68 90 b2 ad da 87 45 62 c7 b9 8b a2 56 cf 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x0586 seq=4 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (29 bytes): 00 10 02 14 4b 45 d9 d0 52 11 68 90 b2 ad da 87 45 62 c7 b9 8b a2 56 cf 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Legitimation blob generated (248 bytes)
DEBUG:s7commplus.connection:Post-auth legitimation: writing solved blob to address 1846
DEBUG:s7commplus.connection:  IntegrityId: write=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x057C seq=5 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (292 bytes): 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 ce 29 58 6c 14 10 b6 bd 01 00 00 00 00 00 00 00 3c 00 00 00 2f 18 07 e2 5c a4 03 52 d3 cb d5 ac 0d e6 d8 bf 49 96 46 74 3d 50 ef 82 e7 8e 57 af 8e 9e 79 ac 88 b3 47 2f 4d 12 a6 e1 b7 2e d7 fd 79 57 3c d4 32 ca 10 5c 06 9c 66 56 14 b1 ed 80 ef be ad de 00 00 00 00 40 00 00 00 ae a3 b0 ac ef 9f a6 5f 63 1b da 44 e5 ac ea 4c 3b b6 1d a2 81 21 0e f5 fc 54 ea 6d 50 a1 26 6a 6e c3 4e 98 1d 74 45 f9 8d 72 07 23 31 07 f4 39 f2 5f 3c a2 7f 7e bf 53 9b 72 1e 08 8c 31 9d 81 ef be ad de 01 00 00 00 18 00 00 00 3a 17 15 08 14 51 06 4e 18 55 c0 82 e0 63 38 b5 3f cd 62 e9 a5 7f 86 55 ef be ad de 02 00 00 00 00 00 00 00 05 00 00 00
DEBUG:s7commplus.connection:  Full frame (348 bytes): 72 03 01 54 20 26 8a 34 cd 2f 69 84 5d b4 e8 a8 54 33 ea 65 6e 6a 35 05 6c 80 28 a8 4b db af 2d 00 06 ce c8 f4 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 ce 29 58 6c 14 10 b6 bd 01 00 00 00 00 00 00 00 3c 00 00 00 2f 18 07 e2 5c a4 03 52 d3 cb d5 ac 0d e6 d8 bf 49 96 46 74 3d 50 ef 82 e7 8e 57 af 8e 9e 79 ac 88 b3 47 2f 4d 12 a6 e1 b7 2e d7 fd 79 57 3c d4 32 ca 10 5c 06 9c 66 56 14 b1 ed 80 ef be ad de 00 00 00 00 40 00 00 00 ae a3 b0 ac ef 9f a6 5f 63 1b da 44 e5 ac ea 4c 3b b6 1d a2 81 21 0e f5 fc 54 ea 6d 50 a1 26 6a 6e c3 4e 98 1d 74 45 f9 8d 72 07 23 31 07 f4 39 f2 5f 3c a2 7f 7e bf 53 9b 72 1e 08 8c 31 9d 81 ef be ad de 01 00 00 00 18 00 00 00 3a 17 15 08 14 51 06 4e 18 55 c0 82 e0 63 38 b5 3f cd 62 e9 a5 7f 86 55 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 355 bytes: 03 00 01 63 02 f0 80 72 03 01 54 20 26 8a 34 cd 2f 69 84 5d b4 e8 a8 54 33 ea 65 6e 6a 35 05 6c 80 28 a8 4b db af 2d 00 06 ce c8 f4 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 ce 29 58 6c 14 10 b6 bd 01 00 00 00 00 00 00 00 3c 00 00 00 2f 18 07 e2 5c a4 03 52 d3 cb d5 ac 0d e6 d8 bf 49 96 46 74 3d 50 ef 82 e7 8e 57 af 8e 9e 79 ac 88 b3 47 2f 4d 12 a6 e1 b7 2e d7 fd 79 57 3c d4 32 ca 10 5c 06 9c 66 56 14 b1 ed 80 ef be ad de 00 00 00 00 40 00 00 00 ae a3 b0 ac ef 9f a6 5f 63 1b da 44 e5 ac ea 4c 3b b6 1d a2 81 21 0e f5 fc 54 ea 6d 50 a1 26 6a 6e c3 4e 98 1d 74 45 f9 8d 72 07 23 31 07 f4 39 f2 5f 3c a2 7f 7e bf 53 9b 72 1e 08 8c 31 9d 81 ef be ad de 01 00 00 00 18 00 00 00 3a 17 15 08 14 51 06 4e 18 55 c0 82 e0 63 38 b5 3f cd 62 e9 a5 7f 86 55 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=27 payload (23 bytes): 02 f0 80 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:Ignoring non-fatal S7CommPlus SystemEvent (16 bytes)
DEBUG:snap7.connection:Received TPKT: version=3 length=72 payload (68 bytes): 02 f0 80 72 03 00 39 20 ee 7f 87 5f 7d 0a 08 57 72 39 1e e0 c3 6b 21 1e 27 d9 ab a9 61 66 61 8c 4f da 60 19 33 12 f0 7c 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (65 bytes): 72 03 00 39 20 ee 7f 87 5f 7d 0a 08 57 72 39 1e e0 c3 6b 21 1e 27 d9 ab a9 61 66 61 8c 4f da 60 19 33 12 f0 7c 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=57, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): ee7f875f7d0a085772391ee0c36b211e27d9aba96166618c4fda60193312f07c
DEBUG:s7commplus.connection:  Response data (24 bytes): 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x057C seq=5 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 17595385856 (5 bytes)
DEBUG:s7commplus.connection:  Response payload (9 bytes): 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
DEBUG:s7commplus.connection:Legitimation write return_value=0x6CFFFF05
INFO:s7commplus.connection:Post-auth legitimation completed
DEBUG:s7commplus.connection:  IntegrityId: read=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=6 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 06 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 61 dd 33 4f 85 61 c7 56 ee 30 4a ac a9 18 32 04 a4 91 ec 03 b4 3d 56 fe 34 a0 6a b3 1a bd b9 cf 31 00 00 05 86 00 00 00 06 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 61 dd 33 4f 85 61 c7 56 ee 30 4a ac a9 18 32 04 a4 91 ec 03 b4 3d 56 fe 34 a0 6a b3 1a bd b9 cf 31 00 00 05 86 00 00 00 06 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=209 payload (205 bytes): 02 f0 80 72 fe 00 c6 00 00 00 00 00 00 04 a0 00 00 00 00 00 00 00 00 00 00 00 17 00 00 9d 6c 00 00 9d 6d 00 00 00 08 00 00 00 02 00 00 9d 6e 00 00 00 04 00 00 03 9b 00 00 9d 6f 00 00 00 04 00 00 05 86 00 00 9d 70 00 00 00 03 00 06 00 00 9d 71 00 00 00 09 a2 01 3b 00 02 36 ff 88 00 00 9d 72 00 00 00 04 00 00 00 00 00 00 9d 73 00 00 00 04 00 00 05 86 00 00 9d 74 00 00 00 04 00 00 00 e9 00 00 9d 75 00 00 00 04 00 00 00 00 00 00 9d 76 00 00 00 03 00 06 00 00 9d 77 00 00 00 03 00 00 00 00 9d 78 00 00 00 03 10 00 00 00 9d 79 00 00 00 03 10 11 00 00 9d 7a 00 00 00 03 08 01 00 00 9d 7b 00 00 00 03 10 29 00 00 00 00
INFO:snap7.connection:Disconnected from 192.168.0.1:102
Traceback (most recent call last):
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\main.py", line 8, in <module>
    client.connect('192.168.0.1')
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 114, in connect
    self._open_connection()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 122, in _open_connection
    self._connection.connect(
    ~~~~~~~~~~~~~~~~~~~~~~~~^
        use_tls=p["use_tls"],
        ^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
        password=p["password"] or "",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 556, in connect
    self._protection_level = self._get_effective_protection_level()
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 631, in _get_effective_protection_level
    self.send_request(FunctionCode.GET_VAR_SUBSTREAMED, payload, integrity_tail=4)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 857, in send_request
    response_frame = self._recv_response_frame()
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 950, in _recv_response_frame
    _check_system_event(bytes(response_frame[consumed : consumed + data_length]))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 159, in _check_system_event
    raise S7ProtocolError(
    ...<2 lines>...
    )
snap7.error.S7ProtocolError: Fatal S7CommPlus SystemEvent return_value=-6773067493365317752: 00000000000004a000000000000000000000001700009d6c00009d6d000000080000000200009d6e000000040000039b00009d6f000000040000058600009d7000000003000600009d7100000009a2013b000236ff8800009d72000000040000000000009d73000000040000058600009d7400000004000000e900009d75000000040000000000009d7600000003000600009d7700000003000000009d7800000003100000009d7900000003101100009d7a00000003080100009d7b00000003102900000000

1200-browse.zip

1200 db_read():

DEBUG:snap7.connection:TCP connected to 192.168.0.1:102
DEBUG:snap7.connection:Sent COTP Connection Request
DEBUG:snap7.connection:Negotiated PDU size: 1024
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc1, length=2
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc2, length=16
DEBUG:snap7.connection:Received COTP Connection Confirm
INFO:snap7.connection:Connected to 192.168.0.1:102, PDU size: 1024
DEBUG:s7commplus.connection:=== InitSSL === sending (26 bytes): 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=38 payload (34 bytes): 02 f0 80 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== InitSSL === received (31 bytes): 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:InitSSL response: version=V1, data_length=23
DEBUG:s7commplus.connection:InitSSL response body (27 bytes): 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === sending (192 bytes): 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 199 bytes: 03 00 00 c7 02 f0 80 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=215 payload (211 bytes): 02 f0 80 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 bf 77 df 8f ef 0d 7d c2 5d ea 86 de 27 4a 70 2f 5c 3d f3 21 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === received (208 bytes): 72 01 00 c8 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 bf 77 df 8f ef 0d 7d c2 5d ea 86 de 27 4a 70 2f 5c 3d f3 21 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response: version=V1, data_length=200
DEBUG:s7commplus.connection:CreateObject response body (204 bytes): 32 00 00 04 ca 00 00 00 01 36 00 02 87 1b 87 42 a1 00 00 01 20 82 1f 00 00 a3 81 69 00 15 13 30 31 3a 42 44 34 32 36 42 30 39 31 46 30 38 37 33 31 41 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 31 a3 82 2f 10 02 14 bf 77 df 8f ef 0d 7d c2 5d ea 86 de 27 4a 70 2f 5c 3d f3 21 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 1b 31 3b 36 45 53 37 20 32 31 35 2d 31 42 47 34 30 2d 30 58 42 30 20 3b 56 34 2e 32 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response header: opcode=0x32 function=0x04CA seq=1 transport=0x36
DEBUG:s7commplus.connection:CreateObject response: return_value=0 object_ids=['0x39b', '0x3c2']
DEBUG:s7commplus.connection:Session created: id=0x0000039B (923), version=V1
INFO:s7commplus.connection:ServerSessionVersion captured (84 bytes)
INFO:s7commplus.connection:Public key fingerprint captured: 01:BD426B091F08731A
INFO:s7commplus.connection:Session challenge captured (20 bytes): bf77df8fef0d7dc25dea86de274a702f5c3df321
INFO:s7commplus.connection:SessionKey auth blob generated (180 bytes)
INFO:s7commplus.connection:SecurityKey blob included in session setup, IntegrityId tracking enabled
DEBUG:s7commplus.connection:=== SetupSession === sending (392 bytes): 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 24 34 00 0f 8f bd 12 a6 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 49 37 25 0b 1d 9a 31 c3 ce 2a f6 b3 aa 19 93 bb 75 82 f2 95 b2 c1 f2 c6 4a 9a 89 f1 44 d3 63 6b 9b e1 d0 63 4f 28 4b 3b 26 ff 49 93 24 39 68 65 4d 12 84 0d 48 51 59 82 23 c3 5d 6a 40 ca 73 05 60 46 5a a0 36 4f 24 cf fc d0 94 0f ae 00 d0 da 09 d5 c5 5c 60 9e 3d cd 99 12 ec d6 77 81 9e 08 44 ea f0 49 c6 ba 70 36 2a ea 10 b9 f6 ad a8 d8 02 bd ff df f7 87 d0 a2 7b ed 10 0c 15 d8 1a 3b de db 97 74 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Sent 399 bytes: 03 00 01 8f 02 f0 80 72 02 01 80 31 00 00 05 42 00 00 00 02 00 00 03 9b 34 00 00 03 9b 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 de d0 cd b0 c8 fc 90 f3 1a 8e 23 00 04 82 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 82 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 24 34 00 0f 8f bd 12 a6 01 01 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 49 37 25 0b 1d 9a 31 c3 ce 2a f6 b3 aa 19 93 bb 75 82 f2 95 b2 c1 f2 c6 4a 9a 89 f1 44 d3 63 6b 9b e1 d0 63 4f 28 4b 3b 26 ff 49 93 24 39 68 65 4d 12 84 0d 48 51 59 82 23 c3 5d 6a 40 ca 73 05 60 46 5a a0 36 4f 24 cf fc d0 94 0f ae 00 d0 da 09 d5 c5 5c 60 9e 3d cd 99 12 ec d6 77 81 9e 08 44 ea f0 49 c6 ba 70 36 2a ea 10 b9 f6 ad a8 d8 02 bd ff df f7 87 d0 a2 7b ed 10 0c 15 d8 1a 3b de db 97 74 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 80 c2 00 82 3e 00 04 84 80 c2 00 82 3f 00 15 00 82 40 00 15 06 32 3b 31 30 38 32 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=32 payload (28 bytes): 02 f0 80 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:=== SetupSession === received (25 bytes): 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:SetupSession response: function=0x0542
INFO:s7commplus.connection:Session setup completed successfully
DEBUG:s7commplus.connection:Session activation: SET_VARIABLE addr 323 = USINT(5)
DEBUG:s7commplus.connection:  IntegrityId: write=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04F2 seq=3 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 36 c9 a0 c6 03 fc 8f a2 80 90 61 bc a5 c4 40 4b bd 1e b5 1f 60 be c7 6b f0 28 68 11 32 54 70 6b 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 36 c9 a0 c6 03 fc 8f a2 80 90 61 bc a5 c4 40 4b bd 1e b5 1f 60 be c7 6b f0 28 68 11 32 54 70 6b 31 00 00 04 f2 00 00 00 03 00 00 03 9b 34 00 00 03 9b 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=64 payload (60 bytes): 02 f0 80 72 03 00 31 20 5c 81 74 12 5c ae 7f 01 29 9f 02 ae cf 7e 23 f9 b7 76 5d 4c df 7c 0f 08 e0 0b 65 e5 5c 69 a6 ce 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (57 bytes): 72 03 00 31 20 5c 81 74 12 5c ae 7f 01 29 9f 02 ae cf 7e 23 f9 b7 76 5d 4c df 7c 0f 08 e0 0b 65 e5 5c 69 a6 ce 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=49, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 5c8174125cae7f01299f02aecf7e23f9b7765d4cdf7c0f08e00b65e55c69a6ce
DEBUG:s7commplus.connection:  Response data (16 bytes): 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x04F2 seq=3 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (5 bytes): 06 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Session activation completed
DEBUG:s7commplus.connection:Post-auth legitimation: reading challenge from address 303
DEBUG:s7commplus.connection:  IntegrityId: read=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=4 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 04 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 86 50 29 29 a7 4d eb 71 de b2 31 20 4c f6 ca 4b a5 d2 e6 dc f5 bf a5 bb b0 01 ff 62 37 d6 2b 05 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 86 50 29 29 a7 4d eb 71 de b2 31 20 4c f6 ca 4b a5 d2 e6 dc f5 bf a5 bb b0 01 ff 62 37 d6 2b 05 31 00 00 05 86 00 00 00 04 00 00 03 9b 34 00 00 03 9b 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=88 payload (84 bytes): 02 f0 80 72 03 00 49 20 ad a4 22 27 5b ee a5 0a 21 47 fe c6 75 ee eb 30 4b 23 f9 8a 32 5c 8e a2 19 7b 57 06 c9 e5 18 a6 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 07 4d e3 c6 2d 75 1a bc d5 a3 d8 63 41 e7 e6 0e ef f4 0b 29 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (81 bytes): 72 03 00 49 20 ad a4 22 27 5b ee a5 0a 21 47 fe c6 75 ee eb 30 4b 23 f9 8a 32 5c 8e a2 19 7b 57 06 c9 e5 18 a6 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 07 4d e3 c6 2d 75 1a bc d5 a3 d8 63 41 e7 e6 0e ef f4 0b 29 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=73, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): ada422275beea50a2147fec675eeeb304b23f98a325c8ea2197b5706c9e518a6
DEBUG:s7commplus.connection:  Response data (40 bytes): 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 07 4d e3 c6 2d 75 1a bc d5 a3 d8 63 41 e7 e6 0e ef f4 0b 29 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x0586 seq=4 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (29 bytes): 00 10 02 14 07 4d e3 c6 2d 75 1a bc d5 a3 d8 63 41 e7 e6 0e ef f4 0b 29 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Legitimation blob generated (248 bytes)
DEBUG:s7commplus.connection:Post-auth legitimation: writing solved blob to address 1846
DEBUG:s7commplus.connection:  IntegrityId: write=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x057C seq=5 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (292 bytes): 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 8d 30 f0 43 4d 34 c7 a0 01 00 00 00 00 00 00 00 3c 00 00 00 d8 40 ce 1c 36 8e 3f 72 a4 fc 09 4c 73 a5 b4 17 ce 6c fc ef 57 11 07 c3 b0 21 73 15 91 99 1c 77 73 15 97 3f 18 21 d1 7a 1f 43 b6 bc a0 ba eb cd eb 87 53 6c 6e 2e e6 47 ef 12 0c 42 ef be ad de 00 00 00 00 40 00 00 00 77 38 ce 65 7e 27 ff 79 9d 05 30 92 61 7b d1 12 19 b3 96 73 c3 1b e8 e6 89 91 0f 70 8a ab be 6b 73 2d c5 37 e8 4c 5a 66 60 d6 4d 48 d3 93 b1 9c cf b9 77 35 f9 ac af fa ce 29 6a 4b c4 d2 07 f6 ef be ad de 01 00 00 00 18 00 00 00 6c 7f a4 11 2b c9 97 a9 59 73 93 29 aa 48 bf 09 35 3e 9a 4f 12 79 aa c5 ef be ad de 02 00 00 00 00 00 00 00 05 00 00 00
DEBUG:s7commplus.connection:  Full frame (348 bytes): 72 03 01 54 20 eb f3 65 23 ab 8f 34 d1 ab 4d bb 5a 96 94 33 6a 50 23 16 bb bd c4 3c 0e ca 21 d9 ce 0e c6 fb 30 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 8d 30 f0 43 4d 34 c7 a0 01 00 00 00 00 00 00 00 3c 00 00 00 d8 40 ce 1c 36 8e 3f 72 a4 fc 09 4c 73 a5 b4 17 ce 6c fc ef 57 11 07 c3 b0 21 73 15 91 99 1c 77 73 15 97 3f 18 21 d1 7a 1f 43 b6 bc a0 ba eb cd eb 87 53 6c 6e 2e e6 47 ef 12 0c 42 ef be ad de 00 00 00 00 40 00 00 00 77 38 ce 65 7e 27 ff 79 9d 05 30 92 61 7b d1 12 19 b3 96 73 c3 1b e8 e6 89 91 0f 70 8a ab be 6b 73 2d c5 37 e8 4c 5a 66 60 d6 4d 48 d3 93 b1 9c cf b9 77 35 f9 ac af fa ce 29 6a 4b c4 d2 07 f6 ef be ad de 01 00 00 00 18 00 00 00 6c 7f a4 11 2b c9 97 a9 59 73 93 29 aa 48 bf 09 35 3e 9a 4f 12 79 aa c5 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 355 bytes: 03 00 01 63 02 f0 80 72 03 01 54 20 eb f3 65 23 ab 8f 34 d1 ab 4d bb 5a 96 94 33 6a 50 23 16 bb bd c4 3c 0e ca 21 d9 ce 0e c6 fb 30 31 00 00 05 7c 00 00 00 05 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 1a 73 08 1f 09 6b 42 bd 10 01 00 00 00 00 00 00 8d 30 f0 43 4d 34 c7 a0 01 00 00 00 00 00 00 00 3c 00 00 00 d8 40 ce 1c 36 8e 3f 72 a4 fc 09 4c 73 a5 b4 17 ce 6c fc ef 57 11 07 c3 b0 21 73 15 91 99 1c 77 73 15 97 3f 18 21 d1 7a 1f 43 b6 bc a0 ba eb cd eb 87 53 6c 6e 2e e6 47 ef 12 0c 42 ef be ad de 00 00 00 00 40 00 00 00 77 38 ce 65 7e 27 ff 79 9d 05 30 92 61 7b d1 12 19 b3 96 73 c3 1b e8 e6 89 91 0f 70 8a ab be 6b 73 2d c5 37 e8 4c 5a 66 60 d6 4d 48 d3 93 b1 9c cf b9 77 35 f9 ac af fa ce 29 6a 4b c4 d2 07 f6 ef be ad de 01 00 00 00 18 00 00 00 6c 7f a4 11 2b c9 97 a9 59 73 93 29 aa 48 bf 09 35 3e 9a 4f 12 79 aa c5 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=27 payload (23 bytes): 02 f0 80 72 fe 00 10 00 00 00 00 00 00 02 f6 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:Ignoring non-fatal S7CommPlus SystemEvent (16 bytes)
DEBUG:snap7.connection:Received TPKT: version=3 length=72 payload (68 bytes): 02 f0 80 72 03 00 39 20 24 3d c7 ab c9 bd e2 29 15 5a b0 90 7e f1 5d 06 c4 d9 2e 74 1a 1a 37 c1 60 78 4a 4e db 58 a0 e3 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (65 bytes): 72 03 00 39 20 24 3d c7 ab c9 bd e2 29 15 5a b0 90 7e f1 5d 06 c4 d9 2e 74 1a 1a 37 c1 60 78 4a 4e db 58 a0 e3 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=57, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 243dc7abc9bde229155ab0907ef15d06c4d92e741a1a37c160784a4edb58a0e3
DEBUG:s7commplus.connection:  Response data (24 bytes): 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x057C seq=5 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 17595385856 (5 bytes)
DEBUG:s7commplus.connection:  Response payload (9 bytes): 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
DEBUG:s7commplus.connection:Legitimation write return_value=0x6CFFFF05
INFO:s7commplus.connection:Post-auth legitimation completed
DEBUG:s7commplus.connection:  IntegrityId: read=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=6 session=0x0000039B
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 06 00 00 03 9b 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 9b 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 53 22 58 93 96 9e 4a fb b8 c8 b4 48 d2 b6 9a 99 94 b8 00 cf b0 cc 95 af 25 cf 9a c9 1c d7 a5 74 31 00 00 05 86 00 00 00 06 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 53 22 58 93 96 9e 4a fb b8 c8 b4 48 d2 b6 9a 99 94 b8 00 cf b0 cc 95 af 25 cf 9a c9 1c d7 a5 74 31 00 00 05 86 00 00 00 06 00 00 03 9b 34 00 00 03 9b 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=209 payload (205 bytes): 02 f0 80 72 fe 00 c6 00 00 00 00 00 00 04 a0 00 00 00 00 00 00 00 00 00 00 00 17 00 00 9d 6c 00 00 9d 6d 00 00 00 08 00 00 00 02 00 00 9d 6e 00 00 00 04 00 00 03 9b 00 00 9d 6f 00 00 00 04 00 00 05 86 00 00 9d 70 00 00 00 03 00 06 00 00 9d 71 00 00 00 09 a2 01 3b 00 02 36 ff 88 00 00 9d 72 00 00 00 04 00 00 00 00 00 00 9d 73 00 00 00 04 00 00 05 86 00 00 9d 74 00 00 00 04 00 00 00 e9 00 00 9d 75 00 00 00 04 00 00 00 00 00 00 9d 76 00 00 00 03 00 06 00 00 9d 77 00 00 00 03 00 00 00 00 9d 78 00 00 00 03 10 00 00 00 9d 79 00 00 00 03 10 11 00 00 9d 7a 00 00 00 03 08 01 00 00 9d 7b 00 00 00 03 10 29 00 00 00 00
INFO:snap7.connection:Disconnected from 192.168.0.1:102
Traceback (most recent call last):
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\main.py", line 8, in <module>
    client.connect('192.168.0.1')
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 114, in connect
    self._open_connection()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 122, in _open_connection
    self._connection.connect(
    ~~~~~~~~~~~~~~~~~~~~~~~~^
        use_tls=p["use_tls"],
        ^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
        password=p["password"] or "",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 556, in connect
    self._protection_level = self._get_effective_protection_level()
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 631, in _get_effective_protection_level
    self.send_request(FunctionCode.GET_VAR_SUBSTREAMED, payload, integrity_tail=4)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 857, in send_request
    response_frame = self._recv_response_frame()
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 950, in _recv_response_frame
    _check_system_event(bytes(response_frame[consumed : consumed + data_length]))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 159, in _check_system_event
    raise S7ProtocolError(
    ...<2 lines>...
    )
snap7.error.S7ProtocolError: Fatal S7CommPlus SystemEvent return_value=-6773067493365317752: 00000000000004a000000000000000000000001700009d6c00009d6d000000080000000200009d6e000000040000039b00009d6f000000040000058600009d7000000003000600009d7100000009a2013b000236ff8800009d72000000040000000000009d73000000040000058600009d7400000004000000e900009d75000000040000000000009d7600000003000600009d7700000003000000009d7800000003100000009d7900000003101100009d7a00000003080100009d7b00000003102900000000

1200-db_read.zip

@xBiggs

xBiggs commented Aug 20, 2026

Copy link
Copy Markdown

1500 browse()

DEBUG:snap7.connection:TCP connected to 192.168.0.1:102
DEBUG:snap7.connection:Sent COTP Connection Request
DEBUG:snap7.connection:Negotiated PDU size: 1024
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc1, length=2
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc2, length=16
DEBUG:snap7.connection:Received COTP Connection Confirm
INFO:snap7.connection:Connected to 192.168.0.1:102, PDU size: 1024
DEBUG:s7commplus.connection:=== InitSSL === sending (26 bytes): 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=38 payload (34 bytes): 02 f0 80 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== InitSSL === received (31 bytes): 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:InitSSL response: version=V1, data_length=23
DEBUG:s7commplus.connection:InitSSL response body (27 bytes): 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === sending (192 bytes): 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 199 bytes: 03 00 00 c7 02 f0 80 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=216 payload (212 bytes): 02 f0 80 72 01 00 c9 32 00 00 04 ca 00 00 00 01 36 00 02 87 5b 87 28 a1 00 00 01 20 82 1f 01 00 a3 81 69 00 15 13 30 30 3a 31 38 31 42 37 42 30 38 34 37 44 31 31 36 39 34 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 32 a3 82 2f 10 02 14 28 2b 6e c5 d9 d5 ef cb fa 90 c2 4a a6 fb f0 74 9d 5e 3b 91 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 1a 31 3b 36 45 53 37 20 35 31 33 2d 31 41 4c 30 31 2d 30 41 42 30 3b 56 32 2e 31 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === received (209 bytes): 72 01 00 c9 32 00 00 04 ca 00 00 00 01 36 00 02 87 5b 87 28 a1 00 00 01 20 82 1f 01 00 a3 81 69 00 15 13 30 30 3a 31 38 31 42 37 42 30 38 34 37 44 31 31 36 39 34 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 32 a3 82 2f 10 02 14 28 2b 6e c5 d9 d5 ef cb fa 90 c2 4a a6 fb f0 74 9d 5e 3b 91 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 1a 31 3b 36 45 53 37 20 35 31 33 2d 31 41 4c 30 31 2d 30 41 42 30 3b 56 32 2e 31 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response: version=V1, data_length=201
DEBUG:s7commplus.connection:CreateObject response body (205 bytes): 32 00 00 04 ca 00 00 00 01 36 00 02 87 5b 87 28 a1 00 00 01 20 82 1f 01 00 a3 81 69 00 15 13 30 30 3a 31 38 31 42 37 42 30 38 34 37 44 31 31 36 39 34 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 32 a3 82 2f 10 02 14 28 2b 6e c5 d9 d5 ef cb fa 90 c2 4a a6 fb f0 74 9d 5e 3b 91 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 1a 31 3b 36 45 53 37 20 35 31 33 2d 31 41 4c 30 31 2d 30 41 42 30 3b 56 32 2e 31 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response header: opcode=0x32 function=0x04CA seq=1 transport=0x36
DEBUG:s7commplus.connection:CreateObject response: return_value=0 object_ids=['0x3db', '0x3a8']
DEBUG:s7commplus.connection:Session created: id=0x000003DB (987), version=V1
INFO:s7commplus.connection:ServerSessionVersion captured (85 bytes)
INFO:s7commplus.connection:Public key fingerprint captured: 00:181B7B0847D11694
INFO:s7commplus.connection:Session challenge captured (20 bytes): 282b6ec5d9d5efcbfa90c24aa6fbf0749d5e3b91
INFO:s7commplus.connection:SessionKey auth blob generated (180 bytes)
INFO:s7commplus.connection:SecurityKey blob included in session setup, IntegrityId tracking enabled
DEBUG:s7commplus.connection:=== SetupSession === sending (393 bytes): 72 02 01 81 31 00 00 05 42 00 00 00 02 00 00 03 db 34 00 00 03 db 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 8c 86 ef b0 c2 9f a2 96 94 8e 23 00 04 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 80 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 bb 04 76 ac 4e 48 6f c4 01 00 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 cf 5d 7c 1b f5 a7 98 ab 0d 14 1d 23 69 69 2a fe ea 6a 89 9c 5f f1 44 15 c3 1a a6 f1 d4 4c 86 16 8c fe 91 1b b6 06 d2 42 8d f4 fc 11 0b 1e 88 76 51 7f 2a f2 a1 f2 7b ca 0a 66 00 d4 fc a1 0b e4 a2 f6 b9 8a 45 2b 81 37 48 84 6a 84 5a 2b ff 83 34 84 e6 0b 81 da b2 f2 5d ce 01 30 04 4f ac e2 2d aa cd 5a d8 0d 54 86 19 d6 10 90 63 a7 ba c2 bb 47 fb 4b a8 8e ba 28 fa 9c 18 b0 f7 5b 82 ea 0d bf 06 4d 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 00 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Sent 400 bytes: 03 00 01 90 02 f0 80 72 02 01 81 31 00 00 05 42 00 00 00 02 00 00 03 db 34 00 00 03 db 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 8c 86 ef b0 c2 9f a2 96 94 8e 23 00 04 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 80 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 bb 04 76 ac 4e 48 6f c4 01 00 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 cf 5d 7c 1b f5 a7 98 ab 0d 14 1d 23 69 69 2a fe ea 6a 89 9c 5f f1 44 15 c3 1a a6 f1 d4 4c 86 16 8c fe 91 1b b6 06 d2 42 8d f4 fc 11 0b 1e 88 76 51 7f 2a f2 a1 f2 7b ca 0a 66 00 d4 fc a1 0b e4 a2 f6 b9 8a 45 2b 81 37 48 84 6a 84 5a 2b ff 83 34 84 e6 0b 81 da b2 f2 5d ce 01 30 04 4f ac e2 2d aa cd 5a d8 0d 54 86 19 d6 10 90 63 a7 ba c2 bb 47 fb 4b a8 8e ba 28 fa 9c 18 b0 f7 5b 82 ea 0d bf 06 4d 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 00 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=32 payload (28 bytes): 02 f0 80 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:=== SetupSession === received (25 bytes): 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:SetupSession response: function=0x0542
INFO:s7commplus.connection:Session setup completed successfully
DEBUG:s7commplus.connection:Session activation: SET_VARIABLE addr 323 = USINT(5)
DEBUG:s7commplus.connection:  IntegrityId: write=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04F2 seq=3 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 f2 00 00 00 03 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 db 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 50 d9 02 49 9e a2 72 6a 6a 26 c8 4e d2 42 48 0b eb 73 23 18 13 d1 46 6f fb b4 b1 61 b3 2a cb ab 31 00 00 04 f2 00 00 00 03 00 00 03 db 34 00 00 03 db 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 50 d9 02 49 9e a2 72 6a 6a 26 c8 4e d2 42 48 0b eb 73 23 18 13 d1 46 6f fb b4 b1 61 b3 2a cb ab 31 00 00 04 f2 00 00 00 03 00 00 03 db 34 00 00 03 db 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=64 payload (60 bytes): 02 f0 80 72 03 00 31 20 d6 3a b9 bc cd 33 69 85 8c 78 fd bd 16 43 b3 36 9b 21 1e a2 52 01 d2 86 1b 63 e5 60 cf 9a f5 72 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (57 bytes): 72 03 00 31 20 d6 3a b9 bc cd 33 69 85 8c 78 fd bd 16 43 b3 36 9b 21 1e a2 52 01 d2 86 1b 63 e5 60 cf 9a f5 72 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=49, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): d63ab9bccd3369858c78fdbd1643b3369b211ea25201d2861b63e560cf9af572
DEBUG:s7commplus.connection:  Response data (16 bytes): 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x04F2 seq=3 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (5 bytes): 06 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Session activation completed
DEBUG:s7commplus.connection:Post-auth legitimation: reading challenge from address 303
DEBUG:s7commplus.connection:  IntegrityId: read=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=4 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 04 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 db 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 23 1d 6c f4 80 53 80 f6 9f f8 1a d9 76 77 9a eb 39 36 a8 fa 4c 07 82 36 12 c2 4c c9 e9 7b 74 4a 31 00 00 05 86 00 00 00 04 00 00 03 db 34 00 00 03 db 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 23 1d 6c f4 80 53 80 f6 9f f8 1a d9 76 77 9a eb 39 36 a8 fa 4c 07 82 36 12 c2 4c c9 e9 7b 74 4a 31 00 00 05 86 00 00 00 04 00 00 03 db 34 00 00 03 db 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=88 payload (84 bytes): 02 f0 80 72 03 00 49 20 18 36 8a 19 63 58 0c 27 d9 f8 ea 19 f5 07 2d 81 8b 2d 4e b5 73 70 b4 06 a6 f4 e4 7c ab cc ef 41 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 a9 b7 0f a0 ea a6 31 1b 2a 9a 06 e1 81 a0 d6 af fb 73 76 e0 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (81 bytes): 72 03 00 49 20 18 36 8a 19 63 58 0c 27 d9 f8 ea 19 f5 07 2d 81 8b 2d 4e b5 73 70 b4 06 a6 f4 e4 7c ab cc ef 41 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 a9 b7 0f a0 ea a6 31 1b 2a 9a 06 e1 81 a0 d6 af fb 73 76 e0 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=73, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 18368a1963580c27d9f8ea19f5072d818b2d4eb57370b406a6f4e47cabccef41
DEBUG:s7commplus.connection:  Response data (40 bytes): 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 a9 b7 0f a0 ea a6 31 1b 2a 9a 06 e1 81 a0 d6 af fb 73 76 e0 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x0586 seq=4 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (29 bytes): 00 10 02 14 a9 b7 0f a0 ea a6 31 1b 2a 9a 06 e1 81 a0 d6 af fb 73 76 e0 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Legitimation blob generated (248 bytes)
DEBUG:s7commplus.connection:Post-auth legitimation: writing solved blob to address 1846
DEBUG:s7commplus.connection:  IntegrityId: write=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x057C seq=5 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 7c 00 00 00 05 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (292 bytes): 00 00 03 db 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 75 47 49 db 64 eb 3a e4 01 00 00 00 00 00 00 00 3c 00 00 00 fe c7 49 54 37 61 13 28 56 f1 b9 03 ba 7d 86 8f 66 9d d1 b8 c2 e0 c8 a3 39 76 5b 13 83 3c 7f 8f 93 c8 c6 d9 14 20 11 e6 b9 9e d2 50 02 6c 8a 57 41 3e 01 ba ea c5 92 0e f4 37 75 05 ef be ad de 00 00 00 00 40 00 00 00 a8 68 31 cc d6 7e c3 b6 4d 4e ce 5d 74 a2 23 8a 2c 2d 39 0f e7 c6 88 a6 b0 7b 3c 74 f9 ae dd 9b a6 a3 78 12 85 a9 e5 d3 4d d9 fe d5 9f 94 9c 79 5e c1 35 10 04 79 32 10 36 63 75 f4 b9 e1 d5 76 ef be ad de 01 00 00 00 18 00 00 00 e6 a8 cd a5 66 0e 02 22 a6 ce 67 81 71 68 a4 ef b7 bd a1 47 21 c1 ec 43 ef be ad de 02 00 00 00 00 00 00 00 05 00 00 00
DEBUG:s7commplus.connection:  Full frame (348 bytes): 72 03 01 54 20 26 d0 29 ba 0e 4f ec a8 d7 11 84 34 e5 fa 14 8d b9 70 a6 e0 17 b9 95 9c a8 23 23 d4 cc 67 8a f7 31 00 00 05 7c 00 00 00 05 00 00 03 db 34 00 00 03 db 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 75 47 49 db 64 eb 3a e4 01 00 00 00 00 00 00 00 3c 00 00 00 fe c7 49 54 37 61 13 28 56 f1 b9 03 ba 7d 86 8f 66 9d d1 b8 c2 e0 c8 a3 39 76 5b 13 83 3c 7f 8f 93 c8 c6 d9 14 20 11 e6 b9 9e d2 50 02 6c 8a 57 41 3e 01 ba ea c5 92 0e f4 37 75 05 ef be ad de 00 00 00 00 40 00 00 00 a8 68 31 cc d6 7e c3 b6 4d 4e ce 5d 74 a2 23 8a 2c 2d 39 0f e7 c6 88 a6 b0 7b 3c 74 f9 ae dd 9b a6 a3 78 12 85 a9 e5 d3 4d d9 fe d5 9f 94 9c 79 5e c1 35 10 04 79 32 10 36 63 75 f4 b9 e1 d5 76 ef be ad de 01 00 00 00 18 00 00 00 e6 a8 cd a5 66 0e 02 22 a6 ce 67 81 71 68 a4 ef b7 bd a1 47 21 c1 ec 43 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 355 bytes: 03 00 01 63 02 f0 80 72 03 01 54 20 26 d0 29 ba 0e 4f ec a8 d7 11 84 34 e5 fa 14 8d b9 70 a6 e0 17 b9 95 9c a8 23 23 d4 cc 67 8a f7 31 00 00 05 7c 00 00 00 05 00 00 03 db 34 00 00 03 db 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 75 47 49 db 64 eb 3a e4 01 00 00 00 00 00 00 00 3c 00 00 00 fe c7 49 54 37 61 13 28 56 f1 b9 03 ba 7d 86 8f 66 9d d1 b8 c2 e0 c8 a3 39 76 5b 13 83 3c 7f 8f 93 c8 c6 d9 14 20 11 e6 b9 9e d2 50 02 6c 8a 57 41 3e 01 ba ea c5 92 0e f4 37 75 05 ef be ad de 00 00 00 00 40 00 00 00 a8 68 31 cc d6 7e c3 b6 4d 4e ce 5d 74 a2 23 8a 2c 2d 39 0f e7 c6 88 a6 b0 7b 3c 74 f9 ae dd 9b a6 a3 78 12 85 a9 e5 d3 4d d9 fe d5 9f 94 9c 79 5e c1 35 10 04 79 32 10 36 63 75 f4 b9 e1 d5 76 ef be ad de 01 00 00 00 18 00 00 00 e6 a8 cd a5 66 0e 02 22 a6 ce 67 81 71 68 a4 ef b7 bd a1 47 21 c1 ec 43 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=27 payload (23 bytes): 02 f0 80 72 fe 00 10 00 00 00 00 00 00 02 f7 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:Ignoring non-fatal S7CommPlus SystemEvent (16 bytes)
DEBUG:snap7.connection:Received TPKT: version=3 length=72 payload (68 bytes): 02 f0 80 72 03 00 39 20 ea 18 09 ac f3 1f 0b cf 3d 19 5a da 61 84 1e 74 f8 a1 34 2e d2 e9 2d b7 56 e9 e0 45 67 64 27 39 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (65 bytes): 72 03 00 39 20 ea 18 09 ac f3 1f 0b cf 3d 19 5a da 61 84 1e 74 f8 a1 34 2e d2 e9 2d b7 56 e9 e0 45 67 64 27 39 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=57, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): ea1809acf31f0bcf3d195ada61841e74f8a1342ed2e92db756e9e04567642739
DEBUG:s7commplus.connection:  Response data (24 bytes): 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x057C seq=5 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 17595385856 (5 bytes)
DEBUG:s7commplus.connection:  Response payload (9 bytes): 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
DEBUG:s7commplus.connection:Legitimation write return_value=0x6CFFFF05
INFO:s7commplus.connection:Post-auth legitimation completed
DEBUG:s7commplus.connection:  IntegrityId: read=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=6 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 06 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 db 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 a7 e4 29 e3 e6 f3 cb d9 6d 87 64 b3 2a f6 c8 5c 44 80 8d c1 da 6a f5 db de 70 3e 8d e9 da 86 f8 31 00 00 05 86 00 00 00 06 00 00 03 db 34 00 00 03 db 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 a7 e4 29 e3 e6 f3 cb d9 6d 87 64 b3 2a f6 c8 5c 44 80 8d c1 da 6a f5 db de 70 3e 8d e9 da 86 f8 31 00 00 05 86 00 00 00 06 00 00 03 db 34 00 00 03 db 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=209 payload (205 bytes): 02 f0 80 72 fe 00 c6 00 00 00 00 00 00 04 a1 00 00 00 00 00 00 00 00 00 00 00 17 00 00 9d 6c 00 00 9d 6d 00 00 00 08 00 00 00 02 00 00 9d 6e 00 00 00 04 00 00 03 db 00 00 9d 6f 00 00 00 04 00 00 05 86 00 00 9d 70 00 00 00 03 00 06 00 00 9d 71 00 00 00 09 a2 01 3b 00 02 36 ff 88 00 00 9d 72 00 00 00 04 00 00 00 00 00 00 9d 73 00 00 00 04 00 00 05 86 00 00 9d 74 00 00 00 04 00 00 00 e9 00 00 9d 75 00 00 00 04 00 00 00 00 00 00 9d 76 00 00 00 03 00 06 00 00 9d 77 00 00 00 03 00 00 00 00 9d 78 00 00 00 03 10 00 00 00 9d 79 00 00 00 03 10 11 00 00 9d 7a 00 00 00 03 08 01 00 00 9d 7b 00 00 00 03 10 29 00 00 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 04 d4 00 00 00 07 00 00 03 db 36 00 00 00 00 72 01 00 00
INFO:snap7.connection:Disconnected from 192.168.0.1:102
Traceback (most recent call last):
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\main.py", line 8, in <module>
    client.connect('192.168.0.1')
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 114, in connect
    self._open_connection()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 122, in _open_connection
    self._connection.connect(
    ~~~~~~~~~~~~~~~~~~~~~~~~^
        use_tls=p["use_tls"],
        ^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
        password=p["password"] or "",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 556, in connect
    self._protection_level = self._get_effective_protection_level()
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 631, in _get_effective_protection_level
    self.send_request(FunctionCode.GET_VAR_SUBSTREAMED, payload, integrity_tail=4)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 857, in send_request
    response_frame = self._recv_response_frame()
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 950, in _recv_response_frame
    _check_system_event(bytes(response_frame[consumed : consumed + data_length]))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 159, in _check_system_event
    raise S7ProtocolError(
    ...<2 lines>...
    )
snap7.error.S7ProtocolError: Fatal S7CommPlus SystemEvent return_value=-6773067493365317752: 00000000000004a100000000000000000000001700009d6c00009d6d000000080000000200009d6e00000004000003db00009d6f000000040000058600009d7000000003000600009d7100000009a2013b000236ff8800009d72000000040000000000009d73000000040000058600009d7400000004000000e900009d75000000040000000000009d7600000003000600009d7700000003000000009d7800000003100000009d7900000003101100009d7a00000003080100009d7b00000003102900000000

1500-browse.zip

1500 db_read():

DEBUG:snap7.connection:TCP connected to 192.168.0.1:102
DEBUG:snap7.connection:Sent COTP Connection Request
DEBUG:snap7.connection:Negotiated PDU size: 1024
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc1, length=2
DEBUG:snap7.connection:Unsupported COTP parameter: code=0xc2, length=16
DEBUG:snap7.connection:Received COTP Connection Confirm
INFO:snap7.connection:Connected to 192.168.0.1:102, PDU size: 1024
DEBUG:s7commplus.connection:=== InitSSL === sending (26 bytes): 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 33 bytes: 03 00 00 21 02 f0 80 72 01 00 12 31 00 00 05 b3 00 00 00 00 00 00 00 00 30 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=38 payload (34 bytes): 02 f0 80 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== InitSSL === received (31 bytes): 72 01 00 17 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:InitSSL response: version=V1, data_length=23
DEBUG:s7commplus.connection:InitSSL response body (27 bytes): 32 00 00 05 a9 00 00 00 00 34 d1 80 b3 a0 80 86 b9 ff 89 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === sending (192 bytes): 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Sent 199 bytes: 03 00 00 c7 02 f0 80 72 01 00 b8 31 00 00 04 ca 00 00 00 01 00 00 01 20 36 00 00 01 1d 00 04 00 00 00 00 00 a1 00 00 00 d3 82 1f 00 00 a3 81 69 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 21 00 15 15 31 3a 3a 3a 36 2e 30 3a 3a 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 28 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 29 00 15 00 a3 82 2a 00 15 0c 70 79 74 68 6f 6e 2d 73 6e 61 70 37 a3 82 2b 00 04 01 a3 82 2c 00 12 80 c3 c9 01 a3 82 2d 00 15 00 a1 00 00 00 d3 81 7f 00 00 a3 81 69 00 15 15 53 75 62 73 63 72 69 70 74 69 6f 6e 43 6f 6e 74 61 69 6e 65 72 a2 a2 00 00 00 00 72 01 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=216 payload (212 bytes): 02 f0 80 72 01 00 c9 32 00 00 04 ca 00 00 00 01 36 00 02 87 5b 87 28 a1 00 00 01 20 82 1f 01 00 a3 81 69 00 15 13 30 30 3a 31 38 31 42 37 42 30 38 34 37 44 31 31 36 39 34 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 32 a3 82 2f 10 02 14 fb cf c0 d0 a3 42 15 8f 18 0f 61 4b 8e 3a 68 0e 9f 6d e5 29 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 1a 31 3b 36 45 53 37 20 35 31 33 2d 31 41 4c 30 31 2d 30 41 42 30 3b 56 32 2e 31 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:=== CreateObject === received (209 bytes): 72 01 00 c9 32 00 00 04 ca 00 00 00 01 36 00 02 87 5b 87 28 a1 00 00 01 20 82 1f 01 00 a3 81 69 00 15 13 30 30 3a 31 38 31 42 37 42 30 38 34 37 44 31 31 36 39 34 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 32 a3 82 2f 10 02 14 fb cf c0 d0 a3 42 15 8f 18 0f 61 4b 8e 3a 68 0e 9f 6d e5 29 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 1a 31 3b 36 45 53 37 20 35 31 33 2d 31 41 4c 30 31 2d 30 41 42 30 3b 56 32 2e 31 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response: version=V1, data_length=201
DEBUG:s7commplus.connection:CreateObject response body (205 bytes): 32 00 00 04 ca 00 00 00 01 36 00 02 87 5b 87 28 a1 00 00 01 20 82 1f 01 00 a3 81 69 00 15 13 30 30 3a 31 38 31 42 37 42 30 38 34 37 44 31 31 36 39 34 a3 82 2b 00 04 82 80 80 80 02 a3 82 2d 00 15 10 4f 4d 53 50 2e 52 45 4c 2e 38 30 38 39 2e 32 32 a3 82 2f 10 02 14 fb cf c0 d0 a3 42 15 8f 18 0f 61 4b 8e 3a 68 0e 9f 6d e5 29 a3 82 32 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 1a 31 3b 36 45 53 37 20 35 31 33 2d 31 41 4c 30 31 2d 30 41 42 30 3b 56 32 2e 31 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 a2 00 00 00 00 72 01 00 00
DEBUG:s7commplus.connection:CreateObject response header: opcode=0x32 function=0x04CA seq=1 transport=0x36
DEBUG:s7commplus.connection:CreateObject response: return_value=0 object_ids=['0x3db', '0x3a8']
DEBUG:s7commplus.connection:Session created: id=0x000003DB (987), version=V1
INFO:s7commplus.connection:ServerSessionVersion captured (85 bytes)
INFO:s7commplus.connection:Public key fingerprint captured: 00:181B7B0847D11694
INFO:s7commplus.connection:Session challenge captured (20 bytes): fbcfc0d0a342158f180f614b8e3a680e9f6de529
INFO:s7commplus.connection:SessionKey auth blob generated (180 bytes)
INFO:s7commplus.connection:SecurityKey blob included in session setup, IntegrityId tracking enabled
DEBUG:s7commplus.connection:=== SetupSession === sending (393 bytes): 72 02 01 81 31 00 00 05 42 00 00 00 02 00 00 03 db 34 00 00 03 db 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 8c 86 ef b0 c2 9f a2 96 94 8e 23 00 04 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 80 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 62 9e fb 2e 34 8a fb 85 01 00 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 50 86 83 90 ce 19 87 d4 01 7b 01 71 2c 5f 6e 32 5f 83 a1 8b 60 ff 1c 7b 49 0e 59 e5 43 c7 c8 a5 56 58 9b ad dd 4a 95 f7 63 98 d2 33 4f 7a 0b 0d c4 b2 cb 49 e7 17 d9 de bd 4d 19 6e 95 13 58 e9 16 e7 95 1f a7 33 18 82 42 b5 5b 54 d1 76 6c 49 11 a6 f0 5a 50 0c da 28 49 17 07 4d 32 99 93 51 5b d7 36 08 e1 55 ee 7d 7c e2 45 fe 5d 94 b7 9e a9 e7 6e 75 57 15 8c 68 45 ad 4e af 92 6b 7d dd 84 42 5a a9 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 00 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Sent 400 bytes: 03 00 01 90 02 f0 80 72 02 01 81 31 00 00 05 42 00 00 00 02 00 00 03 db 34 00 00 03 db 02 02 8e 26 82 32 01 00 17 00 00 07 08 8e 09 00 04 00 8e 0a 00 02 00 8e 0b 00 17 00 00 07 21 8e 22 00 05 8c 86 ef b0 c2 9f a2 96 94 8e 23 00 04 10 8e 24 00 04 00 00 8e 0c 00 17 00 00 07 21 8e 22 00 05 d1 85 cc 83 ac b4 93 d1 42 8e 23 00 04 84 80 01 8e 24 00 04 00 00 8e 0d 00 14 00 81 34 ad de e1 fe b4 00 00 00 01 00 00 00 01 00 00 00 62 9e fb 2e 34 8a fb 85 01 00 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 50 86 83 90 ce 19 87 d4 01 7b 01 71 2c 5f 6e 32 5f 83 a1 8b 60 ff 1c 7b 49 0e 59 e5 43 c7 c8 a5 56 58 9b ad dd 4a 95 f7 63 98 d2 33 4f 7a 0b 0d c4 b2 cb 49 e7 17 d9 de bd 4d 19 6e 95 13 58 e9 16 e7 95 1f a7 33 18 82 42 b5 5b 54 d1 76 6c 49 11 a6 f0 5a 50 0c da 28 49 17 07 4d 32 99 93 51 5b d7 36 08 e1 55 ee 7d 7c e2 45 fe 5d 94 b7 9e a9 e7 6e 75 57 15 8c 68 45 ad 4e af 92 6b 7d dd 84 42 5a a9 00 02 00 17 00 00 01 3a 82 3b 00 04 84 00 82 3c 00 04 84 00 82 3d 00 04 84 81 82 40 82 3e 00 04 84 81 82 40 82 3f 00 15 00 82 40 00 15 08 32 3b 34 38 34 31 32 39 82 41 00 03 00 03 00 00 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 00 00 00 00 00 72 02 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=32 payload (28 bytes): 02 f0 80 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:=== SetupSession === received (25 bytes): 72 02 00 11 32 00 00 05 42 00 00 00 02 34 00 00 00 00 00 00 00 72 02 00 00
DEBUG:s7commplus.connection:SetupSession response: function=0x0542
INFO:s7commplus.connection:Session setup completed successfully
DEBUG:s7commplus.connection:Session activation: SET_VARIABLE addr 323 = USINT(5)
DEBUG:s7commplus.connection:  IntegrityId: write=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x04F2 seq=3 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 04 f2 00 00 00 03 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 db 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 d1 92 39 42 dc 47 d6 d1 34 f8 b9 4a 28 76 1c c7 de c9 bb 6a ac b3 7c 0a 35 ea 29 b2 ce 08 e1 5b 31 00 00 04 f2 00 00 00 03 00 00 03 db 34 00 00 03 db 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 d1 92 39 42 dc 47 d6 d1 34 f8 b9 4a 28 76 1c c7 de c9 bb 6a ac b3 7c 0a 35 ea 29 b2 ce 08 e1 5b 31 00 00 04 f2 00 00 00 03 00 00 03 db 34 00 00 03 db 01 82 43 00 02 05 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 03 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=64 payload (60 bytes): 02 f0 80 72 03 00 31 20 b5 04 68 64 2d 24 ed 90 d5 0e fc 79 03 e6 6a af 0c 88 a0 5e 32 d0 c3 07 40 5a 9a 53 7c 1d 46 8a 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (57 bytes): 72 03 00 31 20 b5 04 68 64 2d 24 ed 90 d5 0e fc 79 03 e6 6a af 0c 88 a0 5e 32 d0 c3 07 40 5a 9a 53 7c 1d 46 8a 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=49, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): b50468642d24ed90d50efc7903e66aaf0c88a05e32d0c307405a9a537c1d468a
DEBUG:s7commplus.connection:  Response data (16 bytes): 32 00 00 04 f2 00 00 00 03 34 00 06 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x04F2 seq=3 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (5 bytes): 06 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Session activation completed
DEBUG:s7commplus.connection:Post-auth legitimation: reading challenge from address 303
DEBUG:s7commplus.connection:  IntegrityId: read=0
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=4 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 04 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 00
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 db 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 54 40 92 f4 e9 57 f9 c9 fe 25 1a 99 2a 44 98 f4 c0 8c 21 16 cb cc 8a f4 c1 30 fb 69 e4 2d d9 2f 31 00 00 05 86 00 00 00 04 00 00 03 db 34 00 00 03 db 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 54 40 92 f4 e9 57 f9 c9 fe 25 1a 99 2a 44 98 f4 c0 8c 21 16 cb cc 8a f4 c1 30 fb 69 e4 2d d9 2f 31 00 00 05 86 00 00 00 04 00 00 03 db 34 00 00 03 db 20 04 01 82 2f 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 04 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=88 payload (84 bytes): 02 f0 80 72 03 00 49 20 61 63 87 09 63 5a 29 20 c2 b8 48 17 56 8c c5 e9 58 ef 1f 8e 80 70 bd 14 01 36 24 7d 0b e5 32 6a 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 31 90 ba dd 11 3d af 35 27 58 6c 6d 41 69 68 ca ff 1a d6 b2 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (81 bytes): 72 03 00 49 20 61 63 87 09 63 5a 29 20 c2 b8 48 17 56 8c c5 e9 58 ef 1f 8e 80 70 bd 14 01 36 24 7d 0b e5 32 6a 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 31 90 ba dd 11 3d af 35 27 58 6c 6d 41 69 68 ca ff 1a d6 b2 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=73, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 61638709635a2920c2b84817568cc5e958ef1f8e8070bd140136247d0be5326a
DEBUG:s7commplus.connection:  Response data (40 bytes): 32 00 00 05 86 00 00 00 04 34 00 00 10 02 14 31 90 ba dd 11 3d af 35 27 58 6c 6d 41 69 68 ca ff 1a d6 b2 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x0586 seq=4 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 0 (1 bytes)
DEBUG:s7commplus.connection:  Response payload (29 bytes): 00 10 02 14 31 90 ba dd 11 3d af 35 27 58 6c 6d 41 69 68 ca ff 1a d6 b2 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
INFO:s7commplus.connection:Legitimation blob generated (248 bytes)
DEBUG:s7commplus.connection:Post-auth legitimation: writing solved blob to address 1846
DEBUG:s7commplus.connection:  IntegrityId: write=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x057C seq=5 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 7c 00 00 00 05 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (292 bytes): 00 00 03 db 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 e1 86 cb f8 74 6b 60 c1 01 00 00 00 00 00 00 00 3c 00 00 00 95 16 1c 11 e8 0c 2b 8a a9 dc 93 0f 1e 15 75 03 42 b3 0f ba a1 fc 5a e9 65 cf 87 cb 43 52 f7 bf 4d 96 89 d0 87 68 cc ac 89 d5 ff a8 80 22 1b a6 2c 4a 0a 7b 41 4e d3 cf 8e 82 d9 e0 ef be ad de 00 00 00 00 40 00 00 00 c5 e4 d5 39 f0 ac 77 5b 56 c3 54 d8 19 7e cd eb c6 0c b2 c1 d7 ef 2f 48 33 cf 42 7c 95 fe 83 1d 0d 36 93 92 bb de 21 f1 02 ba 92 67 18 c5 69 9c 0d 66 8b ca 31 0d 45 b6 a8 c0 1d ff 31 92 03 5c ef be ad de 01 00 00 00 18 00 00 00 d9 3a 41 eb 86 56 69 6f c3 45 3a f2 8b 81 a5 d2 f5 76 65 87 93 ee de e6 ef be ad de 02 00 00 00 00 00 00 00 05 00 00 00
DEBUG:s7commplus.connection:  Full frame (348 bytes): 72 03 01 54 20 31 94 18 03 41 c1 78 2c 60 e0 d8 55 27 8b 06 1e 29 cc fa e8 97 28 53 6f 19 ce 50 b9 ec 43 5b 39 31 00 00 05 7c 00 00 00 05 00 00 03 db 34 00 00 03 db 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 e1 86 cb f8 74 6b 60 c1 01 00 00 00 00 00 00 00 3c 00 00 00 95 16 1c 11 e8 0c 2b 8a a9 dc 93 0f 1e 15 75 03 42 b3 0f ba a1 fc 5a e9 65 cf 87 cb 43 52 f7 bf 4d 96 89 d0 87 68 cc ac 89 d5 ff a8 80 22 1b a6 2c 4a 0a 7b 41 4e d3 cf 8e 82 d9 e0 ef be ad de 00 00 00 00 40 00 00 00 c5 e4 d5 39 f0 ac 77 5b 56 c3 54 d8 19 7e cd eb c6 0c b2 c1 d7 ef 2f 48 33 cf 42 7c 95 fe 83 1d 0d 36 93 92 bb de 21 f1 02 ba 92 67 18 c5 69 9c 0d 66 8b ca 31 0d 45 b6 a8 c0 1d ff 31 92 03 5c ef be ad de 01 00 00 00 18 00 00 00 d9 3a 41 eb 86 56 69 6f c3 45 3a f2 8b 81 a5 d2 f5 76 65 87 93 ee de e6 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 355 bytes: 03 00 01 63 02 f0 80 72 03 01 54 20 31 94 18 03 41 c1 78 2c 60 e0 d8 55 27 8b 06 1e 29 cc fa e8 97 28 53 6f 19 ce 50 b9 ec 43 5b 39 31 00 00 05 7c 00 00 00 05 00 00 03 db 34 00 00 03 db 20 04 01 8e 36 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 05 01 00 14 00 81 78 ef be ad de 7c 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 94 16 d1 47 08 7b 1b 18 10 00 00 00 00 00 00 00 e1 86 cb f8 74 6b 60 c1 01 00 00 00 00 00 00 00 3c 00 00 00 95 16 1c 11 e8 0c 2b 8a a9 dc 93 0f 1e 15 75 03 42 b3 0f ba a1 fc 5a e9 65 cf 87 cb 43 52 f7 bf 4d 96 89 d0 87 68 cc ac 89 d5 ff a8 80 22 1b a6 2c 4a 0a 7b 41 4e d3 cf 8e 82 d9 e0 ef be ad de 00 00 00 00 40 00 00 00 c5 e4 d5 39 f0 ac 77 5b 56 c3 54 d8 19 7e cd eb c6 0c b2 c1 d7 ef 2f 48 33 cf 42 7c 95 fe 83 1d 0d 36 93 92 bb de 21 f1 02 ba 92 67 18 c5 69 9c 0d 66 8b ca 31 0d 45 b6 a8 c0 1d ff 31 92 03 5c ef be ad de 01 00 00 00 18 00 00 00 d9 3a 41 eb 86 56 69 6f c3 45 3a f2 8b 81 a5 d2 f5 76 65 87 93 ee de e6 ef be ad de 02 00 00 00 00 00 00 00 05 01 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=27 payload (23 bytes): 02 f0 80 72 fe 00 10 00 00 00 00 00 00 02 f7 00 00 00 00 00 00 00 00
DEBUG:s7commplus.connection:Ignoring non-fatal S7CommPlus SystemEvent (16 bytes)
DEBUG:snap7.connection:Received TPKT: version=3 length=72 payload (68 bytes): 02 f0 80 72 03 00 39 20 7b 3c 2b d6 ac fa d9 e8 6e 11 6e 59 07 96 bd df ee 30 2a 0b 62 1a 99 f7 c0 e0 e9 3e 67 3b da 99 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:=== RECV RESPONSE === raw frame (65 bytes): 72 03 00 39 20 7b 3c 2b d6 ac fa d9 e8 6e 11 6e 59 07 96 bd df ee 30 2a 0b 62 1a 99 f7 c0 e0 e9 3e 67 3b da 99 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00 72 03 00 00
DEBUG:s7commplus.connection:  Frame header: version=V3, data_length=57, header_size=4
DEBUG:s7commplus.connection:  V3 HMAC (32 bytes): 7b3c2bd6acfad9e86e116e590796bddfee302a0b621a99f7c0e0e93e673bda99
DEBUG:s7commplus.connection:  Response data (24 bytes): 32 00 00 05 7c 00 00 00 05 34 c1 c6 91 90 80 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Response header: opcode=0x32 function=0x057C seq=5 transport=0x34
DEBUG:s7commplus.connection:  Response IntegrityId: 17595385856 (5 bytes)
DEBUG:s7commplus.connection:  Response payload (9 bytes): 86 e7 ff fe 05 00 00 00 00
DEBUG:s7commplus.connection:  Trailer (4 bytes): 72 03 00 00
DEBUG:s7commplus.connection:Legitimation write return_value=0x6CFFFF05
INFO:s7commplus.connection:Post-auth legitimation completed
DEBUG:s7commplus.connection:  IntegrityId: read=1
DEBUG:s7commplus.connection:=== SEND REQUEST === function_code=0x0586 seq=6 session=0x000003DB
DEBUG:s7commplus.connection:  Request header (14 bytes): 31 00 00 05 86 00 00 00 06 00 00 03 db 34
DEBUG:s7commplus.connection:  IntegrityId (1 bytes): 01
DEBUG:s7commplus.connection:  Request payload (38 bytes): 00 00 03 db 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 00 00 00 00
DEBUG:s7commplus.connection:  Full frame (94 bytes): 72 03 00 56 20 11 2b fd e7 5d ee f1 79 f0 9a 28 79 f5 75 a4 ce 9d 15 4b 99 1d 75 4a 4a c9 35 a3 59 71 d5 dd 18 31 00 00 05 86 00 00 00 06 00 00 03 db 34 00 00 03 db 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Sent 101 bytes: 03 00 00 65 02 f0 80 72 03 00 56 20 11 2b fd e7 5d ee f1 79 f0 9a 28 79 f5 75 a4 ce 9d 15 4b 99 1d 75 4a 4a c9 35 a3 59 71 d5 dd 18 31 00 00 05 86 00 00 00 06 00 00 03 db 34 00 00 03 db 20 04 01 8e 32 00 00 04 e8 89 69 00 12 00 00 00 00 89 6a 00 13 00 89 6b 00 04 00 00 00 01 01 00 00 00 00 72 03 00 00
DEBUG:snap7.connection:Received TPKT: version=3 length=209 payload (205 bytes): 02 f0 80 72 fe 00 c6 00 00 00 00 00 00 04 a1 00 00 00 00 00 00 00 00 00 00 00 17 00 00 9d 6c 00 00 9d 6d 00 00 00 08 00 00 00 02 00 00 9d 6e 00 00 00 04 00 00 03 db 00 00 9d 6f 00 00 00 04 00 00 05 86 00 00 9d 70 00 00 00 03 00 06 00 00 9d 71 00 00 00 09 a2 01 3b 00 02 36 ff 88 00 00 9d 72 00 00 00 04 00 00 00 00 00 00 9d 73 00 00 00 04 00 00 05 86 00 00 9d 74 00 00 00 04 00 00 00 e9 00 00 9d 75 00 00 00 04 00 00 00 00 00 00 9d 76 00 00 00 03 00 06 00 00 9d 77 00 00 00 03 00 00 00 00 9d 78 00 00 00 03 10 00 00 00 9d 79 00 00 00 03 10 11 00 00 9d 7a 00 00 00 03 08 01 00 00 9d 7b 00 00 00 03 10 29 00 00 00 00
INFO:snap7.connection:Disconnected from 192.168.0.1:102
Traceback (most recent call last):
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\main.py", line 8, in <module>
    client.connect('192.168.0.1')
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 114, in connect
    self._open_connection()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\client.py", line 122, in _open_connection
    self._connection.connect(
    ~~~~~~~~~~~~~~~~~~~~~~~~^
        use_tls=p["use_tls"],
        ^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
        password=p["password"] or "",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 556, in connect
    self._protection_level = self._get_effective_protection_level()
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 631, in _get_effective_protection_level
    self.send_request(FunctionCode.GET_VAR_SUBSTREAMED, payload, integrity_tail=4)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 857, in send_request
    response_frame = self._recv_response_frame()
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 950, in _recv_response_frame
    _check_system_event(bytes(response_frame[consumed : consumed + data_length]))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\python-snap7-fix-v1-sessionkey-challenge-layout-fc2932f\s7commplus\connection.py", line 159, in _check_system_event
    raise S7ProtocolError(
    ...<2 lines>...
    )
snap7.error.S7ProtocolError: Fatal S7CommPlus SystemEvent return_value=-6773067493365317752: 00000000000004a100000000000000000000001700009d6c00009d6d000000080000000200009d6e00000004000003db00009d6f000000040000058600009d7000000003000600009d7100000009a2013b000236ff8800009d72000000040000000000009d73000000040000058600009d7400000004000000e900009d75000000040000000000009d7600000003000600009d7700000003000000009d7800000003100000009d7900000003101100009d7a00000003080100009d7b00000003102900000000

1500-db_read.zip

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.

S7-1200 Session Setup Incomplete

3 participants