From 0222c0e202e5a16baf4dd5fae8617879f2672c5e Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Mon, 4 Jun 2018 20:31:34 +0200 Subject: [PATCH] DNS Server set to 8.8.8.8 --- src/client.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 33bc762..233b251 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -161,7 +161,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col host.erase(pos, host.length() - pos); } - FILE *name = popen(("dig +time=1 -x " + socket->getPeerAddress()->toString() + + FILE *name = popen(("dig @8.8.8.8 +time=1 -x " + socket->getPeerAddress()->toString() + " | grep -oP \"^[^;].*\\t\\K([^ ]*)\\w\"").c_str(), "r"); char hostbuffer[1024]; memset(hostbuffer, 0, 1024); @@ -259,7 +259,6 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col stds pipes = procopen(cmd.c_str()); childpid = pipes.pid; - char fdbuffer[4096]; if (req.getMethod() == "POST" || req.getMethod() == "PUT") { long len = req.isExistingField("Content-Length") ? strtol(req.getField("Content-Length").c_str(), nullptr, 10) : -1; socket->receive(pipes.stdin);