Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

perl useragent spoofing ip address?

Options
  • 07-02-2002 7:32pm
    #1
    Registered Users Posts: 944 ✭✭✭


    is there anyway you can alter a user agent in some perl code to give it a fake ip address. Is it even possible?

    use URI::URL;
    use LWP::UserAgent;
    use HTTP::Request;
    use HTTP::Request::Common;
    use HTTP::Request::Form;
    my $ua = LWP::UserAgent->new;
    my $url = url "http...";
    my $res = $ua->request(GET $url);

    like is there any way to alter $ua to give it a differnet ip address?


Comments

  • Closed Accounts Posts: 1,295 ✭✭✭Meh


    The HTTP user agent has nothing to do with your IP address. You can't spoof your IP address for a http request anyway -- how would the web server send the information back to you? The best you can do is send your request through a proxy.


  • Registered Users Posts: 944 ✭✭✭nahdoic


    yeah thx. Setting up the proxy worked like a charm.

    $ua->proxy('http' => 'http://204.97.153.22:8080');

    :)


Advertisement