X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=tools%2Fprivoxy-log-parser.pl;h=ea337523bb03f990bbc01942b4463a0e474471bb;hp=bf2dbdcde4b2d2083f48419043cae9cb60ca9592;hb=HEAD;hpb=65b3864a2dd8457d8017230cf839ae8719582783 diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index bf2dbdcd..b511931b 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -43,7 +43,7 @@ use warnings; use Getopt::Long; use constant { - PRIVOXY_LOG_PARSER_VERSION => '0.9.4', + PRIVOXY_LOG_PARSER_VERSION => '0.9.5', # Feel free to mess with these ... DEFAULT_BACKGROUND => 'black', # Choose registered colour (like 'black') DEFAULT_TEXT_COLOUR => 'white', # Choose registered colour (like 'black') @@ -186,6 +186,8 @@ sub prepare_our_stuff() { 'configuration-line' => 'red', 'content-type' => 'yellow', 'HOST' => HEADER_DEFAULT_COLOUR, + 'tls-version' => 'pink', + 'cipher-suite' => 'light_cyan', ); %h_colours = %h; @@ -1458,7 +1460,8 @@ sub handle_loglevel_crunch($) { # Highlight crunch reason foreach my $reason (keys %reason_colours) { - $content =~ s@($reason)@$reason_colours{$reason}$1$h{'Standard'}@g; + # Crunch: Blocked: https://capture.condenastdigital.com/track?_o=cne&[...]&dim2=%7B%22adBlocked%[...] + $content =~ s@($reason)@$reason_colours{$reason}$1$h{'Standard'}@; } if ($content =~ m/\[too long, truncated\]$/) { @@ -1925,6 +1928,32 @@ sub handle_loglevel_connect($) { # Buffering encrypted client body. Prepared to read up to 2236 bytes. $c =~ s@(?<=up to )(\d+)@$h{'Number'}$1$h{'Standard'}@; + } elsif ($c =~ m/^The last \d+ bytes of the encrypted request body have been read/) { + + # The last 6945 bytes of the encrypted request body have been read. + $c =~ s@(?<=The last )(\d+)@$h{'Number'}$1$h{'Standard'}@; + + } elsif ($c =~ m/^Reducing the chunk offset from/) { + + # Reducing the chunk offset from 1096654 to 32704 after discarding 1063950 bytes to make room in the buffer. + # Reducing the chunk offset from 16219 to 128 after flushing 16091 bytes. + $c =~ s@(?<=\d to )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=offset from )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=after discarding )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=after flushing )(\d+)@$h{'Number'}$1$h{'Standard'}@; + + } elsif ($c =~ m/^Client socket \d+ is no longer usable/) { + + # Client socket 21 is no longer usable. The server socket has been closed. + $c =~ s@(?<=Client socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; + + } elsif ($c =~ m/^(Client|Server) successfully connected over/) { + + # Server successfully connected over TLSv1.3 (TLS_AES_256_GCM_SHA384). + # Client successfully connected over TLSv1.3 (TLS_AES_128_GCM_SHA256). + $c =~ s@(?<=connected over )(TLSv\d\.\d)@$h{'tls-version'}$1$h{'Standard'}@; + $c =~ s@(?<=\()([^)]+)@$h{'cipher-suite'}$1$h{'Standard'}@; + } elsif ($c =~ m/^Looks like we / or $c =~ m/^Unsetting keep-alive flag/ or $c =~ m/^No connections to wait/ or