Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 61b316c

Browse files
committed
added rules support for /zones/:id/firewall/waf/packages/:id/rules/:id
1 parent 520abbb commit 61b316c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli4/cli4.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ def cli4(args):
268268
identifier3 = None
269269

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

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

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

0 commit comments

Comments
 (0)