import json


def rule(event):
    if all(
        [
            event.deep_get("cs-method", default="") in ["GET", "POST"],
            "/cgi-bin/luci/;stok=/locale" in event.deep_get("cs-uri", default=""),
            "form=country" in event.deep_get("cs-uri", default=""),
            any(
                [
                    "operation=write" in json.dumps(event.to_dict()),
                    "country=$(" in json.dumps(event.to_dict()),
                ]
            ),
        ]
    ):
        return True
    return False
