Skip to content

Commit

Permalink
Added arg case for logs
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorWeders committed Sep 18, 2024
1 parent 7853748 commit cd1ce83
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/goodbyedpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ static struct option long_options[] = {
{"fake-gen", required_argument, 0, 'j' },
{"fake-resend", required_argument, 0, 't' },
{"debug-exit", optional_argument, 0, 'x' },
{"debug-log", optional_argument, 0, 'l' },
{0, 0, 0, 0 }
};

Expand Down Expand Up @@ -577,8 +578,6 @@ static void send_native_fragment(HANDLE w_filter, WINDIVERT_ADDRESS addr,
}

int main(int argc, char *argv[]) {
debugPrint = &printf;
debug("Testing debug output");
static enum packet_type_e {
unknown,
ipv4_tcp, ipv4_tcp_data, ipv4_udp_data,
Expand Down Expand Up @@ -967,6 +966,10 @@ int main(int argc, char *argv[]) {
case 'x': // --debug-exit
debug_exit = true;
break;
case 'l':
debugPrint = &printf;
debug("Testing debug output\n");
break;
default:
puts("Usage: goodbyedpi.exe [OPTION...]\n"
" -p block passive DPI\n"
Expand Down

0 comments on commit cd1ce83

Please sign in to comment.