fail2ban-geo-exporter
fail2ban-geo-exporter copied to clipboard
Logic errors
There are 2 errors essentially in the code:
- the time conversion only considers seconds, but as soon as other values than seconds are given, the usage is incorrect.
I recommend to use the original function from fail2ban itself (MyTime.str2seconds): https://github.com/fail2ban/fail2ban/blob/095aeda8407b433098df35424cde2764a09566a6/fail2ban/server/mytime.py
- within the loop the same-initialized class "jail" is called, which however does not correspond to the current iteration value of the run variable. It returns always the same values of the last entry from the jail class.
Just rename the name of the iteration values from to something else, then it should work.