diff --git a/lib/aws/attacks.py b/lib/aws/attacks.py index 1438c79..a88172f 100755 --- a/lib/aws/attacks.py +++ b/lib/aws/attacks.py @@ -761,7 +761,7 @@ def cypher_resolve_commands(history=False): resolved = f"REPLACE({resolved}, \"${{{placeholder}}}\", {substitute})" - resolved = ("EXTRACT(_ IN %s|%s)" % (strings["commands"], resolved) + resolved = ("[_ IN %s|%s]" % (strings["commands"], resolved) ).replace('{', '{{').replace('}', '}}') if history: @@ -842,6 +842,7 @@ def cypher_inject(): f"[:{x.groupdict()['type']}{{", ', '.join([ f"{k}: '{v}'" for k, v in {"Effect": 'Allow', # Default to allow + **dict({"Condition": []} if self.conditional else {}), **{k: v for (k, v) in [ re.sub(r"[^\S]*(?P[^:.]*):'(?P[^'.]*)'", lambda x: f"{x.groupdict()['k']},{x.groupdict()['v']}",