[Perl] Find paths

Un simple scanner para buscar directorios sin index en
la pagina que quieran


 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!usr/bin/perl
#Find Paths
#(C) Doddy Hackman 2011
 
use LWP::UserAgent;
use HTML::LinkExtor;
use URI::Split qw(uri_split);
 
my $nave = LWP::UserAgent->new;
$nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
$nave->timeout(5);
 
head();
unless($ARGV[0]) {
print "\n\n<ul class="bbc_list"><li type="square"> Sintax : $0 <web>\n\n";[/li][/list]
} else {
scan($ARGV[0]);
}
copyright();
 
sub scan {
 
print "\n</li><li type="square"> Find paths in $_[0]\n\n\n";[/li][/list]
my @urls = repes(get_links(toma($_[0])));
for $url(@urls) {
my $web = $url;
my ($scheme, $auth, $path, $query, $frag)  = uri_split($url);
if ($_[0] =~/$auth/ or $auth eq "") {
if ($path=~/(.*)\/(.*)\.(.*)$/) {
my $borrar = $2.".".$3;
if ($web=~/(.*)$borrar/) {
my $co = $1;
unless ($co=~/$auth/) {
$co = $_[0].$co;
}
$code = toma($co);
if ($code=~/Index Of/ig) {
print "[Link] : ".$co."\n";
}}}}}}
 
sub get_links {
 
$test = HTML::LinkExtor->new(\&agarrar)->parse($_[0]);
return @links;
 
sub agarrar {
my ($a,%b) = @_;
push(@links,values %b); 
}
}
 
sub repes {
foreach $test(@_) {
push @limpio,$test unless $repe{$test}++;
}
return @limpio;
}
 
sub head {
print "\n\n-- == Find Paths == --\n\n";
}
 
sub copyright {
print "\n\n(C) Doddy Hackman 2011\n\n";
exit(1);
}
 
sub toma {
return $nave->get($_[0])->content;
}
 
sub tomar {
my ($web,$var) = @_;
return $nave->post($web,[%{$var}])->content;
}
 
#Thanks to explorer (PerlEnEspañol)
# ¿ The End ?
 

0 comentarios: sobre [Perl] Find paths

Publicar un comentario para [Perl] Find paths

:a   :b   :c   :d   :e   :f   :g   :h   :i   :j   :k   :l   :m   :n   :o   :p   :q   :r   :s   :t

Calculando Tiempo
Alienspace Theme © Copyright 2017 By Proxor
Mi Ping en TotalPing.com FeedBurner FeedBurner FeedBurner FeedBurner FeedBurner