-
Notifications
You must be signed in to change notification settings - Fork 0
/
dorkscan.pl
78 lines (59 loc) · 2.23 KB
/
dorkscan.pl
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
#!/usr/bin/perl
#Version 1.0 Perl
#Autor >> AlfonzCS
use HTTP::Request;
use LWP::Simple;
use LWP::UserAgent;
use Win32::Console::ANSI;
use IO::Socket::INET;
use Term::ANSIColor;
use IO::Select;
use HTTP::Response;
use HTTP::Request::Common qw(POST);
use HTTP::Request::Common qw(GET);
use URI::URL;
if ($^O =~ /MSWin32/) {system("cls"); system("color A");
}else { system("clear"); }
print color 'reset';
print color("bold yellow"), " ..#..#...#####....####...#####...##..##...####....####....####...##..##...#..#..\n";
print color("bold yellow"), " .######..##..##..##..##..##..##..##.##...##......##..##..##..##..###.##..######.\n";
print color("bold blue"), " ..#..#...##..##..##..##..#####...####.....####...##......######..##.###...#..#..\n";
print color("bold blue"), " .######..##..##..##..##..##..##..##.##.......##..##..##..##..##..##..##..######.\n";
print color("bold red"), " ..#..#...#####....####...##..##..##..##...####....####...##..##..##..##...#..#..\n";
print color("bold red"), " ................................................................................\n";
print color 'reset';
print color("bold Green"), " CS! : DorkScan Buscador de enlaces usando Dorks. \n";
print color 'reset';
$ag = LWP::UserAgent->new();
$ag->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801");
$ag->timeout(10);
print color("bold Green")," \n\n Introdusca Dork ~# ";
$dork=<STDIN>;
chomp $dork;
print color("yellow"), "\n";
for (my $i=1; $i<=2000; $i+=10) {
$url = "http://www.bing.com/search?q=$dork&filt=all&first=$i&FORM=PERE";
$resp = $ag->request(HTTP::Request->new(GET => $url));
$rrs = $resp->content;
while($rrs =~ m/<a href=\"?http:\/\/(.*?)\//g){
$link = $1;
if ( $link !~ /overture|msn|live|bing|yahoo|duckduckgo|google|w3|microsof/)
{
if ($link !~ /^http:/)
{
$link = 'http://' . "$link" . '/';
}
if($link !~ /\"|\?|\=|index\.php/){
if (! grep (/$link/,@result))
{
print "$link\n";
open(save, '>>scanned_dork.txt');
print save "$link\n";
close(save);
push(@result,$link);
}
}
}
}
}
exit