Various WinDivert improvements.
- Add UNBIND/DISCONNECT events to the SOCKET layer. These events can only be sniffed. - Remove the RECV_PARTIAL flag. The user application can just ignore the error code instead. - WINDIVERT_ADDRESS is now 64bytes. Some extra padding added for future-proofing. - Ignore SOCKET-layer REAUTHORIZE. - The REFLECT layer returns the filter object directly (no IPv4 "pseudo" packet).
This commit is contained in:
@@ -103,22 +103,34 @@ int __cdecl main(int argc, char **argv)
|
||||
continue;
|
||||
}
|
||||
|
||||
SetConsoleTextAttribute(console, FOREGROUND_GREEN);
|
||||
switch (addr.Event)
|
||||
{
|
||||
case WINDIVERT_EVENT_SOCKET_BIND:
|
||||
SetConsoleTextAttribute(console, FOREGROUND_GREEN);
|
||||
printf("BIND");
|
||||
break;
|
||||
case WINDIVERT_EVENT_SOCKET_UNBIND:
|
||||
SetConsoleTextAttribute(console, FOREGROUND_RED);
|
||||
printf("UNBIND");
|
||||
break;
|
||||
case WINDIVERT_EVENT_SOCKET_LISTEN:
|
||||
SetConsoleTextAttribute(console, FOREGROUND_GREEN);
|
||||
printf("LISTEN");
|
||||
break;
|
||||
case WINDIVERT_EVENT_SOCKET_CONNECT:
|
||||
SetConsoleTextAttribute(console, FOREGROUND_GREEN);
|
||||
printf("CONNECT");
|
||||
break;
|
||||
case WINDIVERT_EVENT_SOCKET_DISCONNECT:
|
||||
SetConsoleTextAttribute(console, FOREGROUND_RED);
|
||||
printf("DISCONNECT");
|
||||
break;
|
||||
case WINDIVERT_EVENT_SOCKET_ACCEPT:
|
||||
SetConsoleTextAttribute(console, FOREGROUND_GREEN);
|
||||
printf("ACCEPT");
|
||||
break;
|
||||
default:
|
||||
SetConsoleTextAttribute(console, FOREGROUND_BLUE);
|
||||
printf("???");
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user