2 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
my $pua = LWP::Parallel::UserAgent->new();
$pua->in_order(1); # handle requests in order of registration
$pua->duplicates(0); # ignore duplicates
$pua->timeout(1); # in seconds
$pua->redirect(1); # follow redirects
$pua->max_hosts(3); # sets maximum number of locations accessed in parallel
$pua->max_req($thread_max); # sets maximum number of parallel requests per host
$pua->agent("MS Internet Explorer");
foreach my $url (@to_scan) {
my $request = HTTP::Request->new('GET', $url);
$pua->register($request);
}
my $results = $pua->wait(0);
my $succeeded = 0;
my %errors = ();
foreach my $entry (values %$results) {
my $response = $entry->response();
print " " . $response->code() . " \n";
#$response->content();
}
2 Einträge, 1 Seite |