gods

a simple blocklist for ssh
Log | Files | Refs | README | LICENSE

commit 77f26df5d45e7bb2e80d23dd0650471f90382efa
parent 79938c65dc7580c4653fa7adce0b0db6aaf1fe3f
Author: Naveen Narayanan <zerous@nocebo.space>
Date:   Thu, 30 Sep 2021 19:48:42 +0200

Use a config file to set configuration files

Diffstat:
Aconfig.h | 3+++
Mmain.c | 3++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/config.h b/config.h @@ -0,0 +1,3 @@ +char *sshlog = "/var/log/authlog"; +char *black_list = "/etc/gods/blacklist"; +char *white_list = "/etc/gods/whitelist"; diff --git a/main.c b/main.c @@ -5,6 +5,7 @@ #include <string.h> #include "attack.h" +#include "config.h" #include "fw.h" #include "parser.h" #include "queue.h" @@ -54,7 +55,7 @@ main(int argc, char **argv) char *line; int c, found; - fp = fopen("./authlog", "r"); + fp = fopen(sshlog, "r"); if (!fp) err(1, "fopen failed: %s", sshlog);