Thanks for coding this idea.
I found a couple of issues and will open them separately. This one is "for the record", i.e. I think it is already covered by an MR that is now being reviewed.
The current code base gives an error:
File "/usr/local/bin/fail2ban-block-ip-range.py", line 33
script = 'tail -n 10000 /var/log/fail2ban.log | grep -E "fail2ban.filter.*\[[0-9]+\]:.*\[[^]]+\] Found ([0-9]{1,3}\.){3}[0-9]{1,3}" -o | sed -re "s/fail2ban.filter\s+\[[0-9]+\]:\sINFO\s+\[//; s/\]//; s/Found //;" | sort | uniq -c>
^
SyntaxError: EOL while scanning string literal
The last characters of line 33 should be uniq -c > ' + tmpf[1] in stead of uniq -c>
Hi,
Thanks for coding this idea. I found a couple of issues and will open them separately. This one is "for the record", i.e. I think it is already covered by an MR that is now being reviewed.
The current code base gives an error:
The last characters of line 33 should be
uniq -c > ' + tmpf[1]
in stead ofuniq -c>
This was introduced in https://github.com/WKnak/fail2ban-block-ip-range/pull/7
I would have made an MR for this small fix, but I guess that this is already covered by https://github.com/WKnak/fail2ban-block-ip-range/pull/11
Jacco