I could be completely missing the ball on this one so any input is
appreciated. =) 

I have a script that runs some tests (in this case security) against
web servers but I have ran into a problem when I want to test web
servers that aren't on port 80. The code I currently have is:

   use LWP::UserAgent;
   use URI::Heuristic;
   my $raw_url = "$target/whatever.html";
   my $url = URI::Heuristic::uf_urlstr($raw_url);
   $| = 1;                                
   my $ua = LWP::UserAgent->new();
   my $req = HTTP::Request->new(GET => $url);
   $response = $ua->request($req);

Which works fine but when I modified the code to read:

   use LWP::UserAgent;
   use URI::Heuristic;
   my $raw_url = "$target:$port/whatever.html";
   my $url = URI::Heuristic::uf_urlstr($raw_url);
   $| = 1;                                
   my $ua = LWP::UserAgent->new();
   my $req = HTTP::Request->new(GET => $url);
   $response = $ua->request($req);




It no longer worked. I added a line to print out the value of $raw_url
and it was in the correct format - (192.168.11.122:8000/whatever.html)


Any suggestions?


thanks.

-dan

Reply via email to