mitmd

mitm TCP connections
Log | Files | Refs | README

commit fee98f157d33b904afc04a1048b6adeac77e8ad5
parent 4790e9f5e81172d9ea31e6bb8c2e20cf447db883
Author: hhvn <dev@hhvn.uk>
Date:   Wed, 16 Jun 2021 23:06:39 +0100

mitmd.c: cleanup dprintf formatting

Previously I had done something like: verbose ? "function(): " : "",
while prototyping this.

Diffstat:
Mmitmd.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mitmd.c b/mitmd.c @@ -101,15 +101,15 @@ mitm(int client, char *host, char *port) { hints.ai_socktype = SOCK_STREAM; if ((sret = getaddrinfo(host, port, &hints, &ai)) != 0 || ai == NULL) { - dprintf(client, "%s%s\n", "getaddrinfo(): ", gai_strerror(sret)); + dprintf(client, "getaddrinfo(): %s\n", gai_strerror(sret)); goto cleanup; } if ((remote = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) == 1) { - dprintf(client, "%s%s\n", "socket(): ", strerror(errno)); + dprintf(client, "socket(): %s\n", strerror(errno)); goto cleanup; } if (connect(remote, ai->ai_addr, ai->ai_addrlen) == -1) { - dprintf(client, "%s%s\n", "connect(): ", strerror(errno)); + dprintf(client, "connect(): %s\n", strerror(errno)); goto cleanup; }