Skip to content

Instantly share code, notes, and snippets.

@airween
Created June 2, 2019 16:32
Show Gist options
  • Save airween/afd93e4fb58d9b13cbf62ccf852e3ba6 to your computer and use it in GitHub Desktop.
Save airween/afd93e4fb58d9b13cbf62ccf852e3ba6 to your computer and use it in GitHub Desktop.
secrules_parser.py diff
diff --git a/secrules_parser.py b/secrules_parser.py
index 0c1143f..106588b 100644
--- a/secrules_parser.py
+++ b/secrules_parser.py
@@ -94,7 +94,7 @@ def get_rule_id(rule):
def get_rule_regex(rule):
""" Gets the regex. Only for a given SecAction or SecRule """
- if rule.__class__.__name__ == "SecRule" or rule.__class__.__name__ == "SecAction":
+ if rule.__class__.__name__ == "SecRule":
output = {}
if rule.operator.rx is not None:
for action in rule.actions:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment