#perl -w # # $Id: //websites/unixwiz/unixwiz.net/webroot/tools/zaclient.txt#2 $ # # written by : Stephen J. Friedl # Software Consultant # Tustin, California USA # steve@unixwiz.net # # ======================================================== # This program is in the public domain; have fun. # ======================================================== # # This program provokes the ZoneAlarm false-proxy bug. We # captured a sample session to BBR and observed the data # going to and fro. # # We make a TCP connection to the server, send the data, # and collect the response. We are pretty sure that the # response plays a part in ZoneAlarm's confusion, so we # must stick around to collect it. # # This program works well with ZAWatch, a tool to monitor # when ZoneAlarm modifies the registry entry with a proxy # value. Deatils # # # TO TRY THIS # ----------- # # This program requires perl on Windows, and (by far) the best # implementation of perl for Win32 is from ActiveState. # # http://www.activestate.com/Products/ActivePerl/ # # It's free and positively wonderful. # # Once installed, save this program to a file on the hard # drive, open a command prompt (Start->Run->"cmd"), and # change to the directory that holds this program, and run # it: # # Start -> Run -> "Cmd" # # C> cd \sjf # # C> perl simpost # # ZoneAlarm will then set your ZA proxy to "unixwiz.net". # # It's probably best to turn it off :-) # use strict; use IO::Socket; my $host = "www.dslreports.com"; # who we connectd to my $proxyhost = "www.unixwiz.net"; my $savefile = "response.txt"; # save what we get my $port = 80; foreach ( @ARGV ) { if ( m/^--help/i ) { print STDERR <new( PeerAddr => $host, PeerPort => $port, Proto => 'tcp'); die "ERROR: can't create socket to $host:$port\n" if not $sock; printf "Sending %d bytes of data to $host:$port\n", length $request; print "------------------------\n"; print $request; print "------------------------\n\n"; print $sock $request; $sock->flush; # now we've sent everything, so collect the reply from # the server. If we fail to collect this response, it # seems that ZoneAlarm won't get confused. open(OUT, ">$savefile") or die "ERROR: can't create output file $savefile\n"; print "Collecting response to $savefile\n"; print "------------------------\n"; my $nbytes = 0; while ( <$sock> ) { print "$_"; print OUT $_; $nbytes += length $_; } close OUT; print "------------------------\n"; printf "Saved %d bytes to $savefile\n", $nbytes;