in reply to Checking for Cloaked Webpages

First you need to hook up the gas anomaly detector to the photon torpedo's guidance system . . . . Wait, that's a cloaked Bird of Prey.

Presuming you control enough of the network infrastructure between you and the webserver so that you can succesfully spoof whatever IP and get the traffic back to you, if you setup an interface with the right IP you can fairly easily tell LWP to use that address for sending outgoing traffic.

package MyHTTP; use base qw(LWP::Protocol::http); sub _new_socket { my($self, $host, $port, $timeout) = @_; local($^W) = 0; # IO::Socket::INET can be noisy my @args = (PeerAddr => $host, PeerPort => $port, Proto => 'tcp', Timeout => $timeout, ); push @args, LocalAddr => $ENV{LWP_LOCAL_ADDR} if exists $ENV{LWP_LOCAL_ADDR}; my $sock = IO::Socket::INET->new( @args ); unless ($sock) { # IO::Socket::INET leaves additional error messages in $@ $@ =~ s/^.*?: //; die "Can't connect to $host:$port ($@)"; } $sock; } LWP::Protocol::implementor( 'http', 'MyHTTP' ); package main; use LWP::Simple qw( getprint ); getprint( shift || 'http://localhost/' ); exit 0; __END__

Replies are listed 'Best First'.
Re: Re: Checking for Cloaked Webpages
by webadept (Pilgrim) on Dec 06, 2002 at 18:28 UTC
    What, do you sit there and refesh this page all day?? Geez.. didn't even have time to get a cup of coffee..

    That's very cool.. thanks for you suggestion there and yes, I can do the network setup.

    webadept

    Every day someone is doing what someone else said is impossible.
      Welcome to the wonders of the Newest Nodes page. :) With a minimum of about 4 - 5 users browsing the site at all times it is quite likely that you will get replies nearly instantly, at least if what you're asking about is not extraordinarily exotic.

      Makeshifts last the longest.