import json


def rule(event):
    if all(
        [
            event.deep_get("cs-method", default="") in ["GET", "POST"],
            any(
                [
                    "/remote/hostcheck_validate" in event.deep_get("cs-uri-query", default=""),
                    "/remote/logincheck" in event.deep_get("cs-uri-query", default=""),
                ]
            ),
            "enc=" in json.dumps(event.to_dict()),
        ]
    ):
        return True
    return False
