comment
IRC Chat
play_arrow
Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.

[Perl] DH ViewBot 0.2

  • 0 Respuestas
  • 3142 Vistas

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado BigBear

  • *
  • Underc0der
  • Mensajes: 543
  • Actividad:
    0%
  • Reputación 3
    • Ver Perfil
« en: Enero 16, 2015, 12:59:59 pm »
Un simple script que sirve como bot para hacer visitas con las siguientes opciones :

  • 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: Perl
  1. #!usr/bin/perl
  2. #DH ViewBot 0.2
  3. #(C) Doddy Hackman 2015
  4.  
  5. use Getopt::Long;
  6. use LWP::UserAgent;
  7. use URI::Split You are not allowed to view links. Register or Login(uri_split);
  8. use IO::Socket;
  9.  
  10. my @agents = (
  11. 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0',
  12.     'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14',
  13. 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36',
  14. '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',
  15. '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',
  16.     'Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))',
  17. 'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14',
  18. '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'
  19. );
  20.  
  21. GetOptions(
  22.     "single=s"     => \$single_opt,
  23.     "file=s"       => \$file_opt,
  24.     "randomfile=s" => \$randomfile_opt,
  25.     "timeout=i"    => \$timeout_opt,
  26.     "count=i"      => \$count_opt
  27. );
  28.  
  29. head();
  30.  
  31. if ( $single_opt or $file_opt or $randomfile_opt ) {
  32.  
  33.     my $page = $single_opt;
  34.  
  35.     my $timeout = "";
  36.  
  37.     if ( $timeout_opt eq "" ) {
  38.         $timeout = "5";
  39.     }
  40.     else {
  41.         $timeout = $timeout_opt;
  42.     }
  43.  
  44.     my $count = "";
  45.  
  46.     if ( $count_opt eq "" ) {
  47.         $count = "10";
  48.     }
  49.     else {
  50.         $count = $count_opt;
  51.     }
  52.  
  53.     if ( $single_opt ne "" ) {
  54.  
  55.         my $page = $single_opt;
  56.  
  57.         You are not allowed to view links. Register or Login "\n[+] Configuration\n";
  58.  
  59.         You are not allowed to view links. Register or Login "\n--------------------------------------------------";
  60.         You are not allowed to view links. Register or Login "\n[+] Page : " . $page . "\n";
  61.         You are not allowed to view links. Register or Login "[+] Timeout : " . $timeout . "\n";
  62.         You are not allowed to view links. Register or Login "[+] Visit Count  : " . $count . "\n";
  63.         You are not allowed to view links. Register or Login "--------------------------------------------------";
  64.  
  65.         visitar( $page, $timeout, $count, "single" );
  66.  
  67.     }
  68.  
  69.     elsif ( $randomfile_opt ne "" ) {
  70.  
  71.         visitar_random( $randomfile_opt, $timeout, $count );
  72.  
  73.     }
  74.     elsif ( $file_opt ne "" ) {
  75.  
  76.         if ( $file_opt ne "" ) {
  77.  
  78.             unless ( -f $file_opt ) {
  79.                 You are not allowed to view links. Register or Login "\n[-] File not exist\n";
  80.                 copyright();
  81.                 You are not allowed to view links. Register or Login(1);
  82.             }
  83.  
  84.             You are not allowed to view links. Register or Login "\n" . toma_fecha_y_hora("Started");
  85.  
  86.             my @paginas = repes( leer_archivo($file_opt) );
  87.  
  88.             for my $page (@paginas) {
  89.  
  90.                 You are not allowed to view links. Register or Login $page;
  91.  
  92.                 You are not allowed to view links. Register or Login "\n--------------------------------------------------";
  93.                 You are not allowed to view links. Register or Login "\n[+] Page : " . $page . "\n";
  94.                 You are not allowed to view links. Register or Login "[+] Timeout : " . $timeout . "\n";
  95.                 You are not allowed to view links. Register or Login "[+] Visit Count : " . $count . "\n";
  96.                 You are not allowed to view links. Register or Login "--------------------------------------------------";
  97.  
  98.                 visitar( $page, $timeout, $count, "file" );
  99.  
  100.             }
  101.  
  102.             You are not allowed to view links. Register or Login "\n" . toma_fecha_y_hora("Finished");
  103.  
  104.         }
  105.         else {
  106.             You are not allowed to view links. Register or Login "\n[-] Option not selected\n";
  107.             You are not allowed to view links. Register or Login(1);
  108.         }
  109.  
  110.     }
  111.  
  112. }
  113. else {
  114.     You are not allowed to view links. Register or Login You are not allowed to view links. Register or Login(
  115. [+] Options :
  116.  
  117. -single : Page to visit
  118. -file : File with pages to visit
  119. -randomfile : File with pages to visit as random
  120. -timeout : Time for visit
  121. -count : Count to visist
  122.  
  123. );
  124.     You are not allowed to view links. Register or Login
  125. "[+] Example : perl $0 -single http://www.supertangas.com/index.php -timeout 5 -count 50\n";
  126. }
  127. copyright();
  128.  
  129. # Functions
  130.  
  131. sub head {
  132.     You are not allowed to view links. Register or Login "\n-- == DH ViewBot 0.2 == --\n";
  133. }
  134.  
  135. sub copyright {
  136.     You are not allowed to view links. Register or Login "\n-- == (C) Doddy Hackman 2015 == --\n";
  137. }
  138.  
  139. sub visitar_random {
  140.  
  141.     my ( $file, $timeout, $count ) = @_;
  142.  
  143.     my @paginas     = repes( leer_archivo($file) );
  144.     my $total_bueno = "";
  145.     my $total_malo  = "";
  146.  
  147.     You are not allowed to view links. Register or Login "\n" . toma_fecha_y_hora("Started");
  148.  
  149.     for ( 1 .. $count ) {
  150.         my $target = $paginas[ You are not allowed to view links. Register or Login(@paginas) ];
  151.         You are not allowed to view links. Register or Login $target;
  152.         You are not allowed to view links. Register or Login "\n--------------------------------------------------";
  153.         You are not allowed to view links. Register or Login "\n[+] Page : " . $target . "\n";
  154.         You are not allowed to view links. Register or Login "[+] Timeout : " . $timeout . "\n";
  155.         You are not allowed to view links. Register or Login "--------------------------------------------------";
  156.  
  157.         You are not allowed to view links. Register or Login "\n\n[+] Getting information ...\n\n";
  158.  
  159.         You are not allowed to view links. Register or Login toma_banner($target) . "\n";
  160.  
  161.         my ( $status, $control ) = toma_response($target);
  162.  
  163.         if ( $control eq "1" ) {
  164.             $total_bueno++;
  165.         }
  166.         else {
  167.             $total_malo++;
  168.         }
  169.  
  170.         You are not allowed to view links. Register or Login "\n[+] Visit $_ : $target : " . $status . "\n";
  171.  
  172.         You are not allowed to view links. Register or Login($timeout);
  173.  
  174.     }
  175.  
  176.     You are not allowed to view links. Register or Login "\n[+] Successful Visits : " . $total_bueno . "\n";
  177.  
  178.     You are not allowed to view links. Register or Login "\n" . toma_fecha_y_hora("Finished");
  179.  
  180. }
  181.  
  182. sub visitar {
  183.  
  184.     my ( $page, $timeout, $count, $type ) = @_;
  185.  
  186.     You are not allowed to view links. Register or Login "\n\n[+] Getting information ...\n\n";
  187.  
  188.     You are not allowed to view links. Register or Login toma_banner($page);
  189.  
  190.     if ( $type eq "single" ) {
  191.         You are not allowed to view links. Register or Login "\n\n" . toma_fecha_y_hora("Started") . "\n";
  192.     }
  193.     else {
  194.         You are not allowed to view links. Register or Login "\n\n" . "[+] Working ..." . "\n\n";
  195.     }
  196.  
  197.     my $total_bueno = "";
  198.     my $total_malo  = "";
  199.  
  200.     for ( 1 .. $count ) {
  201.  
  202.         You are not allowed to view links. Register or Login($timeout);
  203.  
  204.         my ( $status, $control ) = toma_response($page);
  205.  
  206.         if ( $control eq "1" ) {
  207.             $total_bueno++;
  208.         }
  209.         else {
  210.             $total_malo++;
  211.         }
  212.  
  213.         You are not allowed to view links. Register or Login STDOUT, "[+] Visit $_ : $page : " . $status . "\r";
  214.  
  215.     }
  216.  
  217.     You are not allowed to view links. Register or Login STDOUT,
  218.       "[+] Successful Visits : " . $total_bueno . "\t\t\t\t\t\t\t\t\t\t\r";
  219.  
  220.     if ( $type eq "single" ) {
  221.         You are not allowed to view links. Register or Login "\n" . toma_fecha_y_hora("Finished");
  222.     }
  223.     else {
  224.         You are not allowed to view links. Register or Login "\n" . "[+] Finished\n";
  225.     }
  226.  
  227. }
  228.  
  229. sub toma_response {
  230.     my $control = "";
  231.     my $nave    = LWP::UserAgent->new();
  232.     $nave->agent( $agents[ You are not allowed to view links. Register or Login @agents ] );
  233.     $nave->timeout(5);
  234.     my $code = $nave->get( $_[0] );
  235.     if ( $code->is_success ) {
  236.         $control = "1";
  237.     }
  238.     else {
  239.         $control = "0";
  240.     }
  241.     my $status = $code->status_line();
  242.     You are not allowed to view links. Register or Login ( $status, $control );
  243. }
  244.  
  245. sub toma_banner {
  246.     my $resultado = "";
  247.     my $nave      = LWP::UserAgent->new();
  248.     $nave->agent( $agents[ You are not allowed to view links. Register or Login @agents ] );
  249.     $nave->timeout(5);
  250.     my $code = $nave->get( $_[0] );
  251.     $resultado = $resultado
  252.       . "--------------------------------------------------------------------------";
  253.     $resultado = $resultado . "\n[+] IP : " . get_ip( $_[0] );
  254.     $resultado = $resultado . "\n[+] Date : " . $code->header('date');
  255.     $resultado = $resultado . "\n[+] Server : " . $code->header('server');
  256.     $resultado =
  257.       $resultado . "\n[+] Connection : " . $code->header('connection');
  258.     $resultado =
  259.       $resultado . "\n[+] Content-Type : " . $code->header('content-type');
  260.  
  261.     if ( $code->header("Set-Cookie") ne "" ) {
  262.         $resultado =
  263.           $resultado . "\n[+] Cookie : " . $code->header("Set-Cookie");
  264.     }
  265.     $resultado = $resultado
  266.       . "\n--------------------------------------------------------------------------";
  267.     You are not allowed to view links. Register or Login $resultado;
  268. }
  269.  
  270. sub get_ip {
  271.     my ( $nomesirve1, $host, $nomesirve2, $nomesirve3, $nomesirve4 ) =
  272.       uri_split( $_[0] );
  273.     my $get = You are not allowed to view links. Register or Login($host);
  274.     You are not allowed to view links. Register or Login inet_ntoa($get);
  275. }
  276.  
  277. sub toma_fecha_y_hora {
  278.  
  279.     my (
  280.         $segundos, $minutos,    $hora,       $dia, $mes,
  281.         $anio,     $nomesirve1, $nomesirve2, $nomesirve3
  282.     ) = You are not allowed to view links. Register or Login(You are not allowed to view links. Register or Login);
  283.  
  284.     $anio += 1900;
  285.     $mes++;
  286.  
  287.     You are not allowed to view links. Register or Login "[+] $_[0] Time : " . "$dia/$mes/$anio $hora:$minutos:$segundos\n";
  288.  
  289. }
  290.  
  291. sub repes {
  292.     my @limpio;
  293.     foreach $test (@_) {
  294.         You are not allowed to view links. Register or Login @limpio, $test unless $repe{$test}++;
  295.     }
  296.     You are not allowed to view links. Register or Login @limpio;
  297. }
  298.  
  299. sub leer_archivo {
  300.     my @r;
  301.     my @words;
  302.     You are not allowed to view links. Register or Login( FILE, $_[0] );
  303.     @words = <FILE>;
  304.     You are not allowed to view links. Register or Login FILE;
  305.     for (@words) {
  306.         You are not allowed to view links. Register or Login( @r, $_ );
  307.     }
  308.     You are not allowed to view links. Register or Login (@r);
  309. }
  310.  
  311. #The End ?
  312.  

Un ejemplo de uso :

Código: You are not allowed to view links. Register or Login

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 == --


 

¿Te gustó el post? COMPARTILO!



Tutorial perl desde cero By: Black Poision & Painboy

Iniciado por ProcessKill

Respuestas: 2
Vistas: 3008
Último mensaje Septiembre 02, 2011, 09:43:36 pm
por blozzter
[Perl] Verificando si es root para correr un script

Iniciado por c1st

Respuestas: 1
Vistas: 1411
Último mensaje Octubre 07, 2012, 06:01:39 pm
por ANTRAX
[Uniscan] Scanner de vulnerabilidades WEB hecho en Perl

Iniciado por tar3kw0rm3d

Respuestas: 0
Vistas: 1551
Último mensaje Junio 02, 2013, 08:01:28 pm
por tar3kw0rm3d
[Perl] Iframe DDos Attack Tool

Iniciado por BigBear

Respuestas: 0
Vistas: 1238
Último mensaje Julio 03, 2011, 10:06:45 pm
por BigBear
[Perl] Counter Strike 1.6 Servers List

Iniciado por BigBear

Respuestas: 0
Vistas: 1101
Último mensaje Noviembre 12, 2012, 07:32:11 pm
por BigBear