fail2ban-geo-exporter icon indicating copy to clipboard operation
fail2ban-geo-exporter copied to clipboard

Logic errors

Open Kontr3X opened this issue 2 years ago • 0 comments

There are 2 errors essentially in the code:

  1. 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

  1. 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.

Kontr3X avatar Aug 28 '22 14:08 Kontr3X