Skip to content

Commit

Permalink
added rules support for /zones/:id/firewall/waf/packages/:id/rules/:id
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Dec 29, 2016
1 parent 520abbb commit 61b316c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli4/cli4.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def cli4(args):
identifier3 = None

hex_only = re.compile('^[0-9a-fA-F]+$')
waf_rules = re.compile('^[0-9]+[A-F]*$')

cf = CloudFlare.CloudFlare(debug=verbose, raw=raw)

Expand Down Expand Up @@ -315,6 +316,8 @@ def cli4(args):
if len(element) in [32, 40, 48] and hex_only.match(element):
# raw identifier - lets just use it as-is
identifier3 = element
elif waf_rules.match(element):
identifier3 = element
else:
exit("/%s/%s :NOT CODED YET 3" % ('/'.join(cmd), element))
else:
Expand Down

0 comments on commit 61b316c

Please sign in to comment.