From 044d06815c25be3636a9efa223ac33951803aaf6 Mon Sep 17 00:00:00 2001 From: pidjan <127833246+pidjan@users.noreply.github.com> Date: Thu, 8 Aug 2024 01:19:10 +0300 Subject: [PATCH 1/4] Add --no-console argument --- src/goodbyedpi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/goodbyedpi.c b/src/goodbyedpi.c index 61da21c..65713d3 100644 --- a/src/goodbyedpi.c +++ b/src/goodbyedpi.c @@ -23,7 +23,7 @@ // My mingw installation does not load inet_pton definition for some reason WINSOCK_API_LINKAGE INT WSAAPI inet_pton(INT Family, LPCSTR pStringBuf, PVOID pAddr); -#define GOODBYEDPI_VERSION "v0.2.3" +#define GOODBYEDPI_VERSION "v0.2.4" #define die() do { sleep(20); exit(EXIT_FAILURE); } while (0) @@ -187,6 +187,7 @@ static struct option long_options[] = { {"native-frag", no_argument, 0, '*' }, {"reverse-frag",no_argument, 0, '(' }, {"max-payload", optional_argument, 0, '|' }, + {"no-console", optional_argument, 0, 'c' }, {0, 0, 0, 0 } }; @@ -937,6 +938,10 @@ int main(int argc, char *argv[]) { else max_payload_size = 1200; break; + case 'c': // --no-console + if (GetConsoleWindow() != NULL) + FreeConsole(); + break; default: puts("Usage: goodbyedpi.exe [OPTION...]\n" " -p block passive DPI\n" @@ -987,6 +992,7 @@ int main(int argc, char *argv[]) { " (like file transfers) in already established sessions.\n" " May skip some huge HTTP requests from being processed.\n" " Default (if set): --max-payload 1200.\n" + " --no-console Hides console window :)\n" "\n"); puts("LEGACY modesets:\n" " -1 -p -r -s -f 2 -k 2 -n -e 2 (most compatible mode)\n" From 99bb8d1e0cf183d937fb8f15a625746718faee43 Mon Sep 17 00:00:00 2001 From: pidjan <127833246+pidjan@users.noreply.github.com> Date: Thu, 8 Aug 2024 01:24:41 +0300 Subject: [PATCH 2/4] Add --no-console argument --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aa2db74..0087e89 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Usage: goodbyedpi.exe [OPTION...] (like file transfers) in already established sessions. May skip some huge HTTP requests from being processed. Default (if set): --max-payload 1200. + --no-console Hides console window :) LEGACY modesets: From acdf603047aa306f3fbe467ccce10bae8eaf662d Mon Sep 17 00:00:00 2001 From: pidjan <127833246+pidjan@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:40:54 +0300 Subject: [PATCH 3/4] Remove --debug-no-console from README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 0087e89..aa2db74 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,6 @@ Usage: goodbyedpi.exe [OPTION...] (like file transfers) in already established sessions. May skip some huge HTTP requests from being processed. Default (if set): --max-payload 1200. - --no-console Hides console window :) LEGACY modesets: From 1a1a7aad79b4398e9347e3715e27dbc7caaebfd1 Mon Sep 17 00:00:00 2001 From: pidjan Date: Fri, 9 Aug 2024 17:50:27 +0300 Subject: [PATCH 4/4] fix spaces --- src/goodbyedpi.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/goodbyedpi.c b/src/goodbyedpi.c index 76b56ef..d6e1d85 100644 --- a/src/goodbyedpi.c +++ b/src/goodbyedpi.c @@ -170,27 +170,27 @@ static const char *http_methods[] = { }; static struct option long_options[] = { - {"port", required_argument, 0, 'z' }, - {"dns-addr", required_argument, 0, 'd' }, - {"dns-port", required_argument, 0, 'g' }, - {"dnsv6-addr", required_argument, 0, '!' }, - {"dnsv6-port", required_argument, 0, '@' }, - {"dns-verb", no_argument, 0, 'v' }, - {"blacklist", required_argument, 0, 'b' }, - {"allow-no-sni", no_argument, 0, ']' }, - {"frag-by-sni", no_argument, 0, '>' }, - {"ip-id", required_argument, 0, 'i' }, - {"set-ttl", required_argument, 0, '$' }, - {"min-ttl", required_argument, 0, '[' }, - {"auto-ttl", optional_argument, 0, '+' }, - {"wrong-chksum", no_argument, 0, '%' }, - {"wrong-seq", no_argument, 0, ')' }, - {"native-frag", no_argument, 0, '*' }, - {"reverse-frag", no_argument, 0, '(' }, - {"max-payload", optional_argument, 0, '|' }, - {"debug-no-console",optional_argument, 0, 'c' }, - {"debug-exit", optional_argument, 0, '?' }, - {0, 0, 0, 0 } + {"port", required_argument, 0, 'z' }, + {"dns-addr", required_argument, 0, 'd' }, + {"dns-port", required_argument, 0, 'g' }, + {"dnsv6-addr", required_argument, 0, '!' }, + {"dnsv6-port", required_argument, 0, '@' }, + {"dns-verb", no_argument, 0, 'v' }, + {"blacklist", required_argument, 0, 'b' }, + {"allow-no-sni",no_argument, 0, ']' }, + {"frag-by-sni", no_argument, 0, '>' }, + {"ip-id", required_argument, 0, 'i' }, + {"set-ttl", required_argument, 0, '$' }, + {"min-ttl", required_argument, 0, '[' }, + {"auto-ttl", optional_argument, 0, '+' }, + {"wrong-chksum",no_argument, 0, '%' }, + {"wrong-seq", no_argument, 0, ')' }, + {"native-frag", no_argument, 0, '*' }, + {"reverse-frag",no_argument, 0, '(' }, + {"max-payload", optional_argument, 0, '|' }, + {"debug-no-console", optional_argument, 0, 'c'}, + {"debug-exit", optional_argument, 0, '?' }, + {0, 0, 0, 0 } }; static char *filter_string = NULL;