|
@@ -89,6 +89,9 @@ class EventHandler(ProcessEvent):
|
|
|
for line in target.readlines():
|
|
|
luser = is_bad(line.rstrip())
|
|
|
if(luser):
|
|
|
+ for ip in myconfig["good_users"]:
|
|
|
+ if luser["ip"] == ip:
|
|
|
+ return # Don't block ourselves
|
|
|
blocker(luser["ip"])
|
|
|
now = pendulum.now().to_atom_string()
|
|
|
log.info("Blocked {0} at {1}".format(luser["ip"], now))
|
|
@@ -107,6 +110,9 @@ class EventHandler(ProcessEvent):
|
|
|
for line in target.readlines():
|
|
|
luser = is_bad(line.rstrip())
|
|
|
if(luser):
|
|
|
+ for ip in myconfig["good_users"]:
|
|
|
+ if luser["ip"] == ip:
|
|
|
+ return # Don't block ourselves
|
|
|
blocker(luser["ip"])
|
|
|
now = pendulum.now().to_atom_string()
|
|
|
log.info("Blocked {0} at {1}".format(luser["ip"], now))
|