Mini Shell

Direktori : /opt/imh-python/lib/python3.9/site-packages/fail2ban/tests/files/action.d/
Upload File :
Current File : //opt/imh-python/lib/python3.9/site-packages/fail2ban/tests/files/action.d/action_checkainfo.py

from fail2ban.server.action import ActionBase


class TestAction(ActionBase):

    def ban(self, aInfo):
        self._logSys.info("ban ainfo %s, %s, %s, %s",
          aInfo["ipmatches"] != '', aInfo["ipjailmatches"] != '', aInfo["ipfailures"] > 0, aInfo["ipjailfailures"] > 0
        )
        self._logSys.info("jail info %d, %d, %d, %d",
          aInfo["jail.banned"], aInfo["jail.banned_total"], aInfo["jail.found"], aInfo["jail.found_total"]
        )

    def unban(self, aInfo):
        pass

Action = TestAction

Zerion Mini Shell 1.0