elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] KingSpam 0.8
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] KingSpam 0.8  (Leído 1,581 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] KingSpam 0.8
« en: 24 Enero 2014, 17:17 pm »

Un simple script para spammear cuentas de correo y canales IRC.

El codigo.

Código
  1. #!usr/bin/perl
  2. #King Spam 0.8
  3. #(C) Doddy Hackman 2014
  4.  
  5. use IO::Socket;
  6. use Win32::OLE;
  7.  
  8. menu();
  9. copyright();
  10.  
  11. sub menu {
  12.  
  13.    head();
  14.  
  15.    print qq(
  16.  
  17. [++] Options
  18.  
  19. [+] 1 : Spam IRC Channel
  20. [+] 2 : Spam E-mail Address
  21. [+] 3 : About
  22. [+] 4 : Exit
  23.  
  24. );
  25.  
  26.    print "[+] Option : ";
  27.    chomp( my $op = <stdin> );
  28.  
  29.    $SIG{INT} = \&volver;
  30.  
  31.    if ( $op eq "1" ) {
  32.  
  33.        print "\n\n-- == IRC Spammer == --\n\n";
  34.  
  35.        print "\n[+] Hostname : ";
  36.        chomp( my $hostname = <stdin> );
  37.        print "\n[+] Port : ";
  38.        chomp( my $port = <stdin> );
  39.        print "\n[+] Channel : ";
  40.        chomp( my $canal = <stdin> );
  41.        print "\n[+] Nickname : ";
  42.        chomp( my $nombre = <stdin> );
  43.        print "\n[+] Spam : ";
  44.        chomp( my $archivo = <stdin> );
  45.  
  46.        my @spamnow = cargarword($archivo);
  47.  
  48.        print "\n[+] Connecting\n\n";
  49.  
  50.        if (
  51.            my $socket = new IO::Socket::INET(
  52.                PeerAddr => $hostname,
  53.                PeerPort => $port,
  54.                Proto    => "tcp"
  55.            )
  56.          )
  57.        {
  58.  
  59.            print $socket "NICK $nombre\r\n";
  60.            print $socket "USER $nombre 1 1 1 1\r\n";
  61.            print $socket "JOIN $canal\r\n";
  62.  
  63.            print "[+] Spammer Online\n\n";
  64.  
  65.            while ( my $log = <$socket> ) {
  66.  
  67.                chomp $log;
  68.  
  69.                if ( $log =~ /^PING(.*)$/i ) {
  70.                    print $socket "PONG $1\r\n";
  71.                }
  72.  
  73.                if ( $log =~ m/:(.*) 353 (.*) = (.*) :(.*)/ig ) {
  74.  
  75.                    while (true) {
  76.  
  77.                        my $pro = $4;
  78.  
  79.                        sleep 10;
  80.  
  81.                        print $socket "PRIVMSG $canal "
  82.                          . $spamnow[ rand(@spamnow) ] . "\r\n";
  83.                        my @nicks = split " ", $pro;
  84.  
  85.                        sleep 3;
  86.  
  87.                        foreach $names (@nicks) {
  88.                            unless ( $nombre eq $names ) {
  89.                                $names =~ s/\@//;
  90.                                print $socket
  91.                                  "MSG $names $spamnow[rand(@spamnow)]\r\n";
  92.                                print "[+] Spam : $names !\n";
  93.                            }
  94.                        }
  95.                    }
  96.                }
  97.            }
  98.        }
  99.        else {
  100.            print "[-] Error\n";
  101.            print "\n[+] Finished\n";
  102.            <stdin>;
  103.            menu();
  104.        }
  105.  
  106.    }
  107.    elsif ( $op eq "2" ) {
  108.  
  109.        print "\n\n-- == Spam Mails == --\n\n";
  110.  
  111.        print "\n[+] Host : ";
  112.        chomp( my $host = <stdin> );
  113.  
  114.        print "\n[+] Port : ";
  115.        chomp( my $puerto = <stdin> );
  116.  
  117.        print "\n[+] Username : ";
  118.        chomp( my $username = <stdin> );
  119.  
  120.        print "\n[+] Password : ";
  121.        chomp( my $password = <stdin> );
  122.  
  123.        print "\n[+] Count Message : ";
  124.        chomp( my $count = <stdin> );
  125.  
  126.        print "\n[+] To : ";
  127.        chomp( my $to = <stdin> );
  128.  
  129.        print "\n[+] Subject : ";
  130.        chomp( my $asunto = <stdin> );
  131.  
  132.        print "\n[+] Body : ";
  133.        chomp( my $body = <stdin> );
  134.  
  135.        print "\n[+] File to Send : ";
  136.        chomp( my $file = <stdin> );
  137.  
  138.        print "\n[+] Starting ...\n\n";
  139.  
  140.        for my $num ( 1 .. $count ) {
  141.            print "[+] Sending Message : $num\n";
  142.            sendmail(
  143.                $host,     $puerto,   $username, $password,
  144.                $username, $username, $username, $to,
  145.                $asunto,   $body,     $file
  146.            );
  147.        }
  148.  
  149.        print "\n[+] Finished\n";
  150.        <stdin>;
  151.        menu();
  152.  
  153.    }
  154.    elsif ( $op eq "3" ) {
  155.        print
  156. "\n\n[+] This program was written by Doddy Hackman in the summer of the 2014\n";
  157.        <stdin>;
  158.        menu();
  159.    }
  160.    elsif ( $op eq "4" ) {
  161.        copyright();
  162.        <stdin>;
  163.        exit(1);
  164.    }
  165.    else {
  166.        menu();
  167.    }
  168.  
  169. }
  170.  
  171. #Functions
  172.  
  173. sub sendmail {
  174.  
  175. ## Function Based on : http://code.activestate.com/lists/pdk/5351/
  176. ## Credits : Thanks to Phillip Richcreek and Eric Promislow
  177.  
  178.    my (
  179.        $host, $port, $username, $password, $from, $cc,
  180.        $bcc,  $to,   $asunto,   $mensaje,  $file
  181.    ) = @_;
  182.  
  183.    $correo = Win32::OLE->new('CDO.Message');
  184.  
  185.    $correo->Configuration->Fields->SetProperty( "Item",
  186.        'http://schemas.microsoft.com/cdo/configuration/sendusername',
  187.        $username );
  188.    $correo->Configuration->Fields->SetProperty( "Item",
  189.        'http://schemas.microsoft.com/cdo/configuration/sendpassword',
  190.        $password );
  191.    $correo->Configuration->Fields->SetProperty( "Item",
  192.        'http://schemas.microsoft.com/cdo/configuration/smtpserver', $host );
  193.    $correo->Configuration->Fields->SetProperty( "Item",
  194.        'http://schemas.microsoft.com/cdo/configuration/smtpserverport',
  195.        $port );
  196.    $correo->Configuration->Fields->SetProperty( "Item",
  197.        'http://schemas.microsoft.com/cdo/configuration/smtpusessl', 1 );
  198.    $correo->Configuration->Fields->SetProperty( "Item",
  199.        'http://schemas.microsoft.com/cdo/configuration/sendusing', 2 );
  200.    $correo->Configuration->Fields->SetProperty( "Item",
  201.        'http://schemas.microsoft.com/cdo/configuration/smtpauthenticate', 1 );
  202.    $correo->Configuration->Fields->Update();
  203.  
  204.    if ( -f $file ) {
  205.        $correo->AddAttachment($file);
  206.    }
  207.  
  208.    $correo->{From}     = $from;
  209.    $correo->{CC}       = $cc;
  210.    $correo->{BCC}      = $bcc;
  211.    $correo->{To}       = $to;
  212.    $correo->{Subject}  = $asunto;
  213.    $correo->{TextBody} = $mensaje;
  214.    $correo->Send();
  215.  
  216. }
  217.  
  218. sub volver {
  219.    print "\n\n[+] Finished\n";
  220.    <stdin>;
  221.    menu();
  222. }
  223.  
  224. sub cargarword {
  225.    my @words;
  226.    my @r;
  227.    open( FILE, $_[0] );
  228.    @words = <FILE>;
  229.    close FILE;
  230.    for (@words) {
  231.        push( @r, $_ );
  232.    }
  233.    return (@r);
  234. }
  235.  
  236. sub limpiarpantalla {
  237.    if ( $^O =~ /Win/ ) {
  238.        system("cls");
  239.    }
  240.    else {
  241.        system("clear");
  242.    }
  243. }
  244.  
  245. sub head {
  246.  
  247.    limpiarpantalla();
  248.  
  249.    print qq(
  250.  
  251.  
  252. @   @  @  @    @   @@@@       @@@   @@@@@    @    @     @
  253. @  @   @  @@   @  @    @     @   @  @    @   @    @     @
  254. @ @    @  @@   @  @          @      @    @  @ @   @@   @@
  255. @@     @  @ @  @  @          @      @    @  @ @   @@   @@
  256. @@     @  @ @  @  @  @@@      @@@   @@@@@  @   @  @ @ @ @
  257. @ @    @  @  @ @  @    @         @  @      @   @  @ @ @ @
  258. @  @   @  @   @@  @    @         @  @      @@@@@  @  @  @
  259. @   @  @  @   @@  @   @@     @   @  @     @     @ @  @  @
  260. @    @ @  @    @   @@@ @      @@@   @     @     @ @     @
  261.  
  262.  
  263. );
  264. }
  265.  
  266. sub copyright {
  267.    print "\n\n-- == (C) Doddy Hackman 2014 == --\n";
  268. }
  269.  
  270. # The End ?
  271.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
perl
Scripting
nobo 0 3,197 Último mensaje 22 Febrero 2005, 07:49 am
por nobo
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 3,835 Último mensaje 18 Mayo 2011, 21:49 pm
por madpitbull_99
[Perl] Creacion de un Joiner en Perl
Scripting
BigBear 0 2,788 Último mensaje 15 Marzo 2013, 16:12 pm
por BigBear
[Delphi] KingSpam 0.4
Programación General
BigBear 1 1,720 Último mensaje 23 Mayo 2015, 11:07 am
por Br1ant
[Ruby] KingSpam 0.4
Scripting
BigBear 0 1,391 Último mensaje 18 Septiembre 2015, 16:49 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines