Skip to content

Commit

Permalink
suricatasc: register iprep-add command
Browse files Browse the repository at this point in the history
Add 'iprep-add' command,
syntax is: iprep-add 'ip' 'cat' 'value'

Examples:
>>> iprep-add 192.168.1.1 1 30
Success:
"IP address added but changes will take accout after 'reload-rules'."

>>> iprep-add 192.168.1.0/24 1 30
Success:
"IP address added but changes will take accout after 'reload-rules'"
  • Loading branch information
glongo committed Mar 9, 2019
1 parent 17f74f0 commit 1394fad
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/suricata/sc/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,20 @@
"required": 1,
},
],
"iprep-add": [
{
"name": "ipaddress",
"required": 1,
},
{
"name": "category",
"type": int,
"required": 1,
},
{
"name": "value",
"type": int,
"required": 1,
},
],
}
1 change: 1 addition & 0 deletions python/suricata/sc/suricatasc.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def __init__(self, sck_path, verbose=False):
"list-hostbit",
"memcap-set",
"memcap-show",
"iprep-add",
]
self.cmd_list = self.basic_commands + self.fn_commands
self.sck_path = sck_path
Expand Down

0 comments on commit 1394fad

Please sign in to comment.