Hello,
I'm having problems using LWP::UserAgent and HTTP::Request:: Common when trying to retrieve a dynamic page generated by a cgi script.
I've got it to the point where I receive a page, but it has none of the dynamic content, and it has several sections that say:
"WARNING: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY"
Now, a bit of googling has narrowed it down, and I think the problem is that the LWP::* and HTTP::* don't support nph responses. The only info I can find through google is all concerned with using the perl script on the server-side, but I want to use a perl script as the client.
For added info, I'm actually trying to query a bugzilla installation (e.g:
http://bugzilla/show_bug.cgi?qu ery_format=spec ific&bug_status =__open__&produ ct=&content=com and+injection
I've tried setting as much as I can in the userAgent
I wouldn't be surprised if I'm going about this completely the wrong way, but any pointers would be appreciated. (code sniuppet below)
Thanks,
Andy
I'm having problems using LWP::UserAgent and HTTP::Request:: Common when trying to retrieve a dynamic page generated by a cgi script.
I've got it to the point where I receive a page, but it has none of the dynamic content, and it has several sections that say:
"WARNING: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY"
Now, a bit of googling has narrowed it down, and I think the problem is that the LWP::* and HTTP::* don't support nph responses. The only info I can find through google is all concerned with using the perl script on the server-side, but I want to use a perl script as the client.
For added info, I'm actually trying to query a bugzilla installation (e.g:
http://bugzilla/show_bug.cgi?qu ery_format=spec ific&bug_status =__open__&produ ct=&content=com and+injection
I've tried setting as much as I can in the userAgent
I wouldn't be surprised if I'm going about this completely the wrong way, but any pointers would be appreciated. (code sniuppet below)
Thanks,
Andy
Code:
use HTTP::Request::Common;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent('Firefox/2.0.0.6'); # Also tried #Mozilla/5.0
push @{ $ua->requests_redirectable }, 'GET';
my $Outputfile = "a.htm";
open OUTPUTFILE, ">$Outputfile";
$res = $ua->request( POST 'http://bugzilla/buglist.cgi', Content_Type => 'multi-part/form-data', Content => [ query_format => "specific", bug_status => "__open__" , product => , content=>"command injection" ]);
if ($res->is_success) {
print OUTPUTFILE $res->content;
}
else {
print $res->status_line, "\n";
}
Comment