• # reaction show -f json

    Posté par . En réponse à la dépêche reaction, remplaçant de fail2ban. Évalué à 2.

    hello,

    est-ce que le format JSON concernant le format de sortie ne pourrait pas être modifié pour permettre l'extraction d'un type "array" ?

    actuellement :
    - format YAML:

    $ reaction show -f yaml
    ssh:
     failedlogin:
     12.21.5.10:
     actions:
     unban:
     - "2024-01-10 05:01:00"
     14.63.162.98:
     actions:
     unban:
     - "2024-01-10 04:05:10"
     24.69.190.84:
     actions:
     unban:
     - "2024-01-10 05:29:19"
    

    format JSON

    $ reaction show -f json
    {
     "ssh": {
     "failedlogin": {
     "101.126.64.69": {
     "actions": {
     "unban": [
     "2024-01-09 20:57:09"
     ]
     }
     },
     "101.43.107.154": {
     "actions": {
     "unban": [
     "2024-01-10 04:36:01"
     ]
     }
     },
     "103.118.29.175": {
     "actions": {
     "unban": [
     "2024-01-09 20:05:30"
     ]
     }
     },
     ...
    

    il est assez difficile de récupérer via JQ les "keys" (adresses IP) concernés par le bannissement. Proposition : ouvrir un tableau "failedlogin": [ ... ]