Add 'any' badips.py bancategory (#2056)

action.d/badips.py: allow `any` as bancategory to retrieve IPs from all categories
pull/2054/head^2
Ben RUBSON 2018-02-27 10:12:22 +01:00 committed by Sergey G. Brester
parent 07fcb24ff6
commit 857767f04b
2 changed files with 2 additions and 1 deletions

View File

@ -46,6 +46,7 @@ ver. 0.10.3-dev-1 (20??/??/??) - development edition
the epoch-pattern similar to `{DATE}` patterns does the capture and cuts out the match of whole pattern from the log-line,
e. g. date-pattern `^\[{LEPOCH}\]\s+:` will match and cut out `[1516469849551000] :` from begin of the log-line.
* badips.py now uses https instead of plain http when requesting badips.com (gh-2057);
* add support for "any" badips.py bancategory, to be able to retrieve IPs from all categories with a desired score (gh-2056);
ver. 0.10.2 (2018/01/18) - nothing-burns-like-the-cold

View File

@ -220,7 +220,7 @@ class BadIPsAction(ActionBase): # pragma: no cover - may be unavailable
@bancategory.setter
def bancategory(self, bancategory):
if bancategory not in self.getCategories(incParents=True):
if bancategory != "any" and bancategory not in self.getCategories(incParents=True):
self._logSys.error("Category name '%s' not valid. "
"see badips.com for list of valid categories",
bancategory)