7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$tmp = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,";
$tmp .= "text/plain;q=0.8,image/png,*/*;q=0.5";
$agent->default_header("Accept" => $tmp);
$agent->default_header("Accept-Charset" => "UTF-8,*");
$agent->default_header("Accept-Encoding" => "gzip,deflate");
$tmp = "de-de,de;q=0.8,en-us;q=0.5,en;q=0.3";
$agent->default_header("Accept-Language" => $tmp);
$agent->default_header("Connection" => "keep-alive");
$agent->default_header("Cache-Control" => "max-age=0");
$agent->default_header("Host" => "warp-factor.homelinux.net");
$agent->default_header("Keep-Alive" => "300");
$agent->default_header("Referer" => $ENV{HTTP_REFERER});
$tmp = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050925 ";
$tmp .= "Firefox/1.0.4 (Debian package 1.0.4-2sarge5)";
$agent->agent($tmp);
$agent->timeout(20);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$tmp = $cgi->param('l');
while (1) {
$response = $agent->head($tmp);
$response = $agent->get($tmp) if($response->code == 501);
if ( $response->code == 301 || # Moved permanetly
$response->code == 302 || # Found, temporary other location
$response->code == 307 ) # Temporary redirect
{
$tmp = $response->header("Location");
}
last if($response->code == 200);
last if($response->code == 404);
}
$dead = 1 if($response->code == 404);
1
2
3
4
5
6
7
8
9
10
11
C:\Dokumente und Einstellungen\Renee>perl -MLWP::Simple -e "print get('http://ww
w.polizei.propk.de/aktionen/kinderpornografie/index.xhtml')"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title>www.polizei-beratung.de - Keine Kompromisse im Kampf gegen Kinder
pornografie</title>
[...]
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new();
my $request = HTTP::Request->new(GET => 'http://www.polizei.propk.de/aktionen/kinderpornografie/index.xhtml');
my $response = $ua->request($request);
print $response->status_line,"\n";
7 Einträge, 1 Seite |