- Visitar una sola pagina
- Visitar paginas en un archivo marcado de forma ordenada
- Visitar paginas en un archivo marcado de forma aleatoria
- Opciones para timeout y cantidad de visitas
El codigo :
Código
#!usr/bin/perl #DH ViewBot 0.2 #(C) Doddy Hackman 2015 use Getopt::Long; use LWP::UserAgent; use IO::Socket; my @agents = ( 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0', 'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14', 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36', 'Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.8pre) Gecko/20070928 Firefox/2.0.0.7 Navigator/9.0RC1', 'Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))', 'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27' ); GetOptions( "single=s" => \$single_opt, "file=s" => \$file_opt, "randomfile=s" => \$randomfile_opt, "timeout=i" => \$timeout_opt, "count=i" => \$count_opt ); head(); if ( $single_opt or $file_opt or $randomfile_opt ) { my $page = $single_opt; my $timeout = ""; if ( $timeout_opt eq "" ) { $timeout = "5"; } else { $timeout = $timeout_opt; } my $count = ""; if ( $count_opt eq "" ) { $count = "10"; } else { $count = $count_opt; } if ( $single_opt ne "" ) { my $page = $single_opt; visitar( $page, $timeout, $count, "single" ); } elsif ( $randomfile_opt ne "" ) { visitar_random( $randomfile_opt, $timeout, $count ); } elsif ( $file_opt ne "" ) { if ( $file_opt ne "" ) { unless ( -f $file_opt ) { copyright(); } my @paginas = repes( leer_archivo($file_opt) ); for my $page (@paginas) { visitar( $page, $timeout, $count, "file" ); } } else { } } } else { [+] Options : -single : Page to visit -file : File with pages to visit -randomfile : File with pages to visit as random -timeout : Time for visit -count : Count to visist ); "[+] Example : perl $0 -single http://www.supertangas.com/index.php -timeout 5 -count 50\n"; } copyright(); # Functions sub head { } sub copyright { } sub visitar_random { my ( $file, $timeout, $count ) = @_; my @paginas = repes( leer_archivo($file) ); my $total_bueno = ""; my $total_malo = ""; for ( 1 .. $count ) { my ( $status, $control ) = toma_response($target); if ( $control eq "1" ) { $total_bueno++; } else { $total_malo++; } } } sub visitar { my ( $page, $timeout, $count, $type ) = @_; if ( $type eq "single" ) { } else { } my $total_bueno = ""; my $total_malo = ""; for ( 1 .. $count ) { my ( $status, $control ) = toma_response($page); if ( $control eq "1" ) { $total_bueno++; } else { $total_malo++; } } "[+] Successful Visits : " . $total_bueno . "\t\t\t\t\t\t\t\t\t\t\r"; if ( $type eq "single" ) { } else { } } sub toma_response { my $control = ""; my $nave = LWP::UserAgent->new(); $nave->timeout(5); my $code = $nave->get( $_[0] ); if ( $code->is_success ) { $control = "1"; } else { $control = "0"; } my $status = $code->status_line(); } sub toma_banner { my $resultado = ""; my $nave = LWP::UserAgent->new(); $nave->timeout(5); my $code = $nave->get( $_[0] ); $resultado = $resultado . "--------------------------------------------------------------------------"; $resultado = $resultado . "\n[+] IP : " . get_ip( $_[0] ); $resultado = $resultado . "\n[+] Date : " . $code->header('date'); $resultado = $resultado . "\n[+] Server : " . $code->header('server'); $resultado = $resultado . "\n[+] Connection : " . $code->header('connection'); $resultado = $resultado . "\n[+] Content-Type : " . $code->header('content-type'); if ( $code->header("Set-Cookie") ne "" ) { $resultado = $resultado . "\n[+] Cookie : " . $code->header("Set-Cookie"); } $resultado = $resultado . "\n--------------------------------------------------------------------------"; } sub get_ip { my ( $nomesirve1, $host, $nomesirve2, $nomesirve3, $nomesirve4 ) = uri_split( $_[0] ); } sub toma_fecha_y_hora { my ( $segundos, $minutos, $hora, $dia, $mes, $año, $nomesirve1, $nomesirve2, $nomesirve3 $año += 1900; $mes++; } sub repes { my @limpio; foreach $test (@_) { } } sub leer_archivo { my @r; my @words; @words = <FILE>; close FILE; for (@words) { } } #The End ?
Un ejemplo de uso :
Código:
C:\Users\Doddy\Desktop\WarFactory\Warfactory X\perl\DH ViewBot>view.pl
-- == DH ViewBot 0.2 == --
[+] Options :
-single : Page to visit
-file : File with pages to visit
-randomfile : File with pages to visit as random
-timeout : Time for visit
-count : Count to visist
[+] Example : perl C:\Users\Doddy\Desktop\WarFactory\Warfactory X\perl\DH ViewBo
t\view.pl -single http://www.supertangas.com/index.php -timeout 5 -count 50
-- == (C) Doddy Hackman 2015 == --
C:\Users\Doddy\Desktop\WarFactory\Warfactory X\perl\DH ViewBot>view.pl -single h
ttp://www.petardas.com/index.php -timeout 5 -count 5
-- == DH ViewBot 0.2 == --
[+] Configuration
--------------------------------------------------
[+] Page : http://www.petardas.com/index.php
[+] Timeout : 5
[+] Visit Count : 5
--------------------------------------------------
[+] Getting information ...
--------------------------------------------------------------------------
[+] IP : 5.135.178.142
[+] Date : Fri, 2 Jan 2015 16:44:10 GMT
[+] Server : Apache/2.2.3 (CentOS)
[+] Connection : close
[+] Content-Type : text/html; charset=latin1
[+] Cookie : pais=AR; expires=Sat, 07-Feb-2015 16:44:10 GMT; path=/; domain=www.
petardas.com, cookieconsent=1; expires=Sat, 07-Feb-2015 16:44:10 GMT; path=/; do
main=www.petardas.com, esmovil=0; expires=Mon, 2-Jan-2015 00:17:30 GMT; path=/;
domain=www.petardas.com
--------------------------------------------------------------------------
[+] Started Time : 2/1/2015 13:44:31
[+] Successful Visits : 5
[+] Finished Time : 2/1/2015 13:45:2
-- == (C) Doddy Hackman 2015 == --