Fix mypy errors in parse_pcap_klap (#1214)

This commit is contained in:
Steven B. 2024-10-29 17:57:40 +00:00 committed by GitHub
parent 673a32258f
commit 1f1d50dd5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,6 +272,7 @@ def main(
case "/app/request": case "/app/request":
if packet.ip.dst != device_ip: if packet.ip.dst != device_ip:
continue continue
assert isinstance(data, str) # noqa: S101
message = bytes.fromhex(data) message = bytes.fromhex(data)
try: try:
plaintext = operator.decrypt(message) plaintext = operator.decrypt(message)
@ -284,6 +285,7 @@ def main(
case "/app/handshake1": case "/app/handshake1":
if packet.ip.dst != device_ip: if packet.ip.dst != device_ip:
continue continue
assert isinstance(data, str) # noqa: S101
message = bytes.fromhex(data) message = bytes.fromhex(data)
operator.local_seed = message operator.local_seed = message
response = None response = None