# http://hoohoo.ncsa.uiuc.edu/cgi/env.html # # # In the case of a POST request, form data is passed on STDIN, so the script should read from there (the number of bytes to be read is given by the Content-length header). In the case of GET, the data is passed in the environment variable QUERY_STRING. The content-type (application/x-www-form-urlencoded) is identical for GET and POST requests. # # /cgi-bin/Perl.exe?&-e+unlink+%3C*%3E, which will cause every file in the server?s current directory to be removed. # # # # if ( ($spill_addr =~ /^127\./) || ($spill_addr =~ /^172\.1[6-9]\./) || ($spill_addr =~ /^172\.2\d\./) || ($spill_addr =~ /^172\.3[0-2]\./) || ($spill_addr =~ /^10\./) || ($spill_addr =~ /^192\.168\./) || ($spill_addr =~ /\.0$/) || ($spill_addr =~ /^0\./) || ($spill_addr =~ /\.255$/) || # ($spill_addr =~ /^\d{1,3}\.\d{1,3}\.255\./) || # ($spill_addr =~ /^\d{1,3}\.255\./) || ($spill_addr =~ /^255\./) ) { # # # # $ENV{ REMOTE_IP } # # # $ENV{'REMOTE_HOST'} = gethostbyaddr(pack("C4",split(/\./,$ENV{'REMOTE_ADDR'})),2); # # # # http://cgi-help.virtualave.net/pub/you-source.txt # ========= # # Get remote host if server does not # # unless ($ENV{REMOTE_HOST} && $ENV{REMOTE_ADDR} ne $ENV{REMOTE_HOST}) # { # my $ip_num = pack("C4", split(/\./, $ENV{REMOTE_ADDR})); # # $ENV{REMOTE_HOST} = scalar gethostbyaddr($ip_num, 2); # # $ENV{REMOTE_HOST} = $ENV{REMOTE_ADDR} unless $ENV{REMOTE_HOST}; # } # # # http://www.kodouguya.com/kusi/prxjdg_cgi.txt # ========= # # $remote_host = $ENV{'REMOTE_HOST'}; # $remote_addr = $ENV{'REMOTE_ADDR'}; # if ( ($remote_host eq $remote_addr) || ($remote_host eq '') ) { # $remote_host = gethostbyaddr(pack('C4', split(/\./, $remote_addr)), 2); # $remote_host = $remote_addr if ( $remote_host eq '' ); # } # # # http://www.mmt-ds.com/cgi-bin/ctxweb/Kaosuk/hits.pl?source # ===================== # # $host = $ENV{'REMOTE_HOST'} ? $ENV{'REMOTE_HOST'}: $ENV{'REMOTE_ADDR'}; $ip = $ENV{'REMOTE_ADDR'}; $host = gethostbyaddr(pack('C4',split(/\./,$ip)),2); if ($host eq "") {$host = $ip;} # # # # # http://www.nordlander.com/erik/ip.shtml # ========================================= # # # # end of file