import json


def rule(event):
    if all(
        [
            "LDP" in json.dumps(event.to_dict()),
            any(
                [
                    "SOCKET_TCP_PACKET_MD5_AUTHEN_FAIL" in json.dumps(event.to_dict()),
                    "TCPMD5AuthenFail" in json.dumps(event.to_dict()),
                ]
            ),
        ]
    ):
        return True
    return False
