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

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] DH Spammer 0.1
« en: 1 Marzo 2012, 22:21 pm »

Hola a todos , aca les traigo un programa que hice para mandar mails con las siguientes opciones.

  • Mensajes que permitan codigo HTML.
  • Adjuntar archivos
  • Mandar la cantidad que quieran
  • Se maneja con una lista de correos (para poder enviar el mismo mail a varios correos)

Para usarlo necesitan una cuenta Gmail para indicarle al programa que los mensajes van a ser enviados desde esa cuenta.

Una imagen del programa


El codigo (formateado con perltidy) es ...........

Código
  1. #!usr/bin/perl
  2. #DH Spammer 0.1
  3. #Coded By Doddy H
  4. #Dependencies
  5. #http://search.cpan.org/~peco/Email-Send-SMTP-Gmail-0.24/lib/Email/Send/SMTP/Gmail.pm
  6. #http://search.cpan.org/~cwest/Net-SMTP-SSL-1.01/lib/Net/SMTP/SSL.pm
  7. #http://search.cpan.org/~sullr/IO-Socket-SSL-1.54/SSL.pm
  8. #ppm install http://www.open.com.au/radiator/free-downloads/Net-SSLeay.ppd
  9. #http://search.cpan.org/~gbarr/Authen-SASL-2.15/lib/Authen/SASL.pod
  10. #Based on http://robertmaldon.blogspot.com/2006/10/sending-email-through-google-smtp-from.html
  11.  
  12. use Tk;
  13. use Tk::ROText;
  14. use Tk::FileSelect;
  15. use Email::Send::SMTP::Gmail;
  16. use Net::SMTP::SSL;
  17. use Cwd;
  18.  
  19. if ( $^O eq 'MSWin32' ) {
  20.    use Win32::Console;
  21.    Win32::Console::Free();
  22. }
  23.  
  24. my $color_fondo = "black";
  25. my $color_texto = "white";
  26.  
  27. my $ve =
  28.  MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
  29. $ve->geometry("920x560+20+20");
  30. $ve->resizable( 0, 0 );
  31. $ve->title("DH Spammer 0.1 (C) Doddy Hackman 2012");
  32.  
  33. $d = $ve->Frame(
  34.    -relief     => "sunken",
  35.    -bd         => 1,
  36.    -background => $color_fondo,
  37.    -foreground => $color_texto
  38. );
  39. my $ma = $d->Menubutton(
  40.    -text             => "Mails",
  41.    -underline        => 1,
  42.    -background       => $color_fondo,
  43.    -foreground       => $color_texto,
  44.    -activebackground => $color_texto
  45. )->pack( -side => "left" );
  46. my $op = $d->Menubutton(
  47.    -text             => "Options",
  48.    -underline        => 1,
  49.    -background       => $color_fondo,
  50.    -foreground       => $color_texto,
  51.    -activebackground => $color_texto
  52. )->pack( -side => "left" );
  53. my $ab = $d->Menubutton(
  54.    -text             => "About",
  55.    -underline        => 1,
  56.    -background       => $color_fondo,
  57.    -foreground       => $color_texto,
  58.    -activebackground => $color_texto
  59. )->pack( -side => "left" );
  60. my $ex = $d->Menubutton(
  61.    -text             => "Exit",
  62.    -underline        => 1,
  63.    -background       => $color_fondo,
  64.    -foreground       => $color_texto,
  65.    -activebackground => $color_texto
  66. )->pack( -side => "left" );
  67. $d->pack( -side => "top", -fill => "x" );
  68.  
  69. $ma->command(
  70.    -label      => "Add Mailist",
  71.    -background => $color_fondo,
  72.    -foreground => $color_texto,
  73.    -command    => \&addmailist
  74. );
  75. $ma->command(
  76.    -label      => "Add Mail",
  77.    -background => $color_fondo,
  78.    -foreground => $color_texto,
  79.    -command    => \&addmail
  80. );
  81. $ma->command(
  82.    -label      => "Clean List",
  83.    -background => $color_fondo,
  84.    -foreground => $color_texto,
  85.    -command    => \&delist
  86. );
  87.  
  88. $op->command(
  89.    -label      => "Spam Now",
  90.    -background => $color_fondo,
  91.    -foreground => $color_texto,
  92.    -command    => \&spamnow
  93. );
  94. $op->command(
  95.    -label      => "Add Attachment",
  96.    -background => $color_fondo,
  97.    -foreground => $color_texto,
  98.    -command    => \&addfile
  99. );
  100. $op->command(
  101.    -label      => "Clean All",
  102.    -background => $color_fondo,
  103.    -foreground => $color_texto,
  104.    -command    => \&clean
  105. );
  106.  
  107. $ab->command(
  108.    -label      => "About",
  109.    -background => $color_fondo,
  110.    -foreground => $color_texto,
  111.    -command    => \&about
  112. );
  113. $ex->command(
  114.    -label      => "Exit",
  115.    -background => $color_fondo,
  116.    -foreground => $color_texto,
  117.    -command    => \&chali
  118. );
  119.  
  120. $ve->Label(
  121.    -text       => "Gmail Login",
  122.    -font       => "Impact3",
  123.    -background => $color_fondo,
  124.    -foreground => $color_texto
  125. )->place( -x => 100, -y => 40 );
  126.  
  127. $ve->Label(
  128.    -text       => "Username : ",
  129.    -background => $color_fondo,
  130.    -foreground => $color_texto
  131. )->place( -x => 20, -y => 80 );
  132. my $user = $ve->Entry(
  133.    -width      => 30,
  134.    -text       => 'lagartojuancho@gmail.com',
  135.    -background => $color_fondo,
  136.    -foreground => $color_texto
  137. )->place( -y => 83, -x => 85 );
  138.  
  139. $ve->Label(
  140.    -text       => "Password : ",
  141.    -background => $color_fondo,
  142.    -foreground => $color_texto
  143. )->place( -x => 20, -y => 120 );
  144. my $pass = $ve->Entry(
  145.    -show       => "*",
  146.    -width      => 30,
  147.    -text       => 'Secret',
  148.    -background => $color_fondo,
  149.    -foreground => $color_texto
  150. )->place( -y => 123, -x => 85 );
  151.  
  152. $ve->Label(
  153.    -text       => "Message",
  154.    -font       => "Impact3",
  155.    -background => $color_fondo,
  156.    -foreground => $color_texto
  157. )->place( -x => 110, -y => 160 );
  158.  
  159. $ve->Label(
  160.    -text       => "Number : ",
  161.    -background => $color_fondo,
  162.    -foreground => $color_texto
  163. )->place( -x => 20, -y => 210 );
  164. my $number = $ve->Entry(
  165.    -width      => 5,
  166.    -text       => "1",
  167.    -background => $color_fondo,
  168.    -foreground => $color_texto
  169. )->place( -x => 75, -y => 212 );
  170.  
  171. $ve->Label(
  172.    -text       => "Attachment : ",
  173.    -background => $color_fondo,
  174.    -foreground => $color_texto
  175. )->place( -x => 20, -y => 240 );
  176. my $fi = $ve->Entry(
  177.    -text       => 'None',
  178.    -width      => 30,
  179.    -background => $color_fondo,
  180.    -foreground => $color_texto
  181. )->place( -x => 90, -y => 242 );
  182.  
  183. $ve->Label(
  184.    -text       => "Subject : ",
  185.    -background => $color_fondo,
  186.    -foreground => $color_texto
  187. )->place( -x => 20, -y => 270 );
  188. my $tema = $ve->Entry(
  189.    -text       => "Hi idiot",
  190.    -width      => 20,
  191.    -background => $color_fondo,
  192.    -foreground => $color_texto
  193. )->place( -x => 73, -y => 273 );
  194.  
  195. $ve->Label(
  196.    -text       => "Body",
  197.    -font       => "Impact3",
  198.    -background => $color_fondo,
  199.    -foreground => $color_texto
  200. )->place( -x => 110, -y => 310 );
  201. my $body = $ve->Scrolled(
  202.    "Text",
  203.    -width      => 30,
  204.    -height     => 12,
  205.    -background => $color_fondo,
  206.    -foreground => $color_texto,
  207.    -scrollbars => "e"
  208. )->place( -x => 45, -y => 350 );
  209. $body->insert( "end", "Welcome to the hell" );
  210.  
  211. $ve->Label(
  212.    -text       => "Mailist",
  213.    -font       => "Impact3",
  214.    -background => $color_fondo,
  215.    -foreground => $color_texto
  216. )->place( -y => 40, -x => 400 );
  217. my $mailist = $ve->Listbox(
  218.    -height     => 31,
  219.    -width      => 33,
  220.    -background => $color_fondo,
  221.    -foreground => $color_texto
  222. )->place( -y => 85, -x => 330 );
  223.  
  224. $ve->Label(
  225.    -text       => "Console",
  226.    -font       => "Impact3",
  227.    -background => $color_fondo,
  228.    -foreground => $color_texto
  229. )->place( -y => 40, -x => 685 );
  230. my $console = $ve->Scrolled(
  231.    "ROText",
  232.    -width      => 40,
  233.    -height     => 31,
  234.    -background => $color_fondo,
  235.    -foreground => $color_texto,
  236.    -scrollbars => "e"
  237. )->place( -x => 580, -y => 84 );
  238.  
  239. MainLoop;
  240.  
  241. sub addmailist {
  242.  
  243.    my $adda = MainWindow->new(
  244.        -background => $color_fondo,
  245.        -foreground => $color_texto
  246.    );
  247.    $adda->geometry("400x90+20+20");
  248.    $adda->resizable( 0, 0 );
  249.    $adda->title("Add Mailist");
  250.  
  251.    $adda->Label(
  252.        -text       => "Mailist : ",
  253.        -background => $color_fondo,
  254.        -foreground => $color_texto,
  255.        -font       => "Impact1"
  256.    )->place( -x => 10, -y => 30 );
  257.    my $en = $adda->Entry(
  258.        -background => $color_fondo,
  259.        -foreground => $color_texto,
  260.        -width      => 33
  261.    )->place( -y => 33, -x => 75 );
  262.    $adda->Button(
  263.        -text             => "Browse",
  264.        -background       => $color_fondo,
  265.        -foreground       => $color_texto,
  266.        -width            => 7,
  267.        -activebackground => $color_texto,
  268.        -command          => \&brona
  269.    )->place( -y => 33, -x => 285 );
  270.    $adda->Button(
  271.        -text             => "Load",
  272.        -background       => $color_fondo,
  273.        -foreground       => $color_texto,
  274.        -width            => 7,
  275.        -activebackground => $color_texto,
  276.        -command          => \&bronaxa
  277.    )->place( -y => 33, -x => 340 );
  278.  
  279.    sub brona {
  280.        $browse = $adda->FileSelect( -directory => getcwd() );
  281.        my $file = $browse->Show;
  282.        $en->configure( -text => $file );
  283.    }
  284.  
  285.    sub bronaxa {
  286.        open( FILE, $en->get );
  287.        @words = <FILE>;
  288.        close FILE;
  289.  
  290.        for (@words) {
  291.            $mailist->insert( "end", $_ );
  292.        }
  293.    }
  294. }
  295.  
  296. sub addfile {
  297.  
  298.    my $addax = MainWindow->new(
  299.        -background => $color_fondo,
  300.        -foreground => $color_texto
  301.    );
  302.    $addax->geometry("390x90+20+20");
  303.    $addax->resizable( 0, 0 );
  304.    $addax->title("Add File");
  305.  
  306.    $addax->Label(
  307.        -text       => "File : ",
  308.        -background => $color_fondo,
  309.        -foreground => $color_texto,
  310.        -font       => "Impact1"
  311.    )->place( -x => 10, -y => 30 );
  312.    my $enaf = $addax->Entry(
  313.        -background => $color_fondo,
  314.        -foreground => $color_texto,
  315.        -width      => 33
  316.    )->place( -y => 33, -x => 55 );
  317.    $addax->Button(
  318.        -text             => "Browse",
  319.        -background       => $color_fondo,
  320.        -foreground       => $color_texto,
  321.        -width            => 7,
  322.        -activebackground => $color_texto,
  323.        -command          => \&bronax
  324.    )->place( -y => 33, -x => 265 );
  325.    $addax->Button(
  326.        -text             => "Load",
  327.        -background       => $color_fondo,
  328.        -foreground       => $color_texto,
  329.        -width            => 7,
  330.        -activebackground => $color_texto,
  331.        -command          => \&bronaxx
  332.    )->place( -y => 33, -x => 320 );
  333.  
  334.    sub bronax {
  335.        $browse = $addax->FileSelect( -directory => getcwd() );
  336.        my $filea = $browse->Show;
  337.        $enaf->configure( -text => $filea );
  338.    }
  339.  
  340.    sub bronaxx {
  341.        $fi->configure( -text => $enaf->get );
  342.    }
  343. }
  344.  
  345. sub addmail {
  346.  
  347.    my $add = MainWindow->new(
  348.        -background => $color_fondo,
  349.        -foreground => $color_texto
  350.    );
  351.    $add->geometry("350x90+20+20");
  352.    $add->resizable( 0, 0 );
  353.    $add->title("Add Mail");
  354.  
  355.    $add->Label(
  356.        -text       => "Mail : ",
  357.        -background => $color_fondo,
  358.        -foreground => $color_texto,
  359.        -font       => "Impact1"
  360.    )->place( -x => 10, -y => 30 );
  361.    my $ew = $add->Entry(
  362.        -background => $color_fondo,
  363.        -foreground => $color_texto,
  364.        -width      => 33
  365.    )->place( -y => 33, -x => 60 );
  366.    $add->Button(
  367.        -text             => "Add",
  368.        -background       => $color_fondo,
  369.        -activebackground => $color_texto,
  370.        -foreground       => $color_texto,
  371.        -width            => 7,
  372.        -command          => \&addnow
  373.    )->place( -y => 33, -x => 275 );
  374.  
  375.    sub addnow {
  376.        $mailist->insert( "end", $ew->get );
  377.    }
  378.  
  379. }
  380.  
  381. sub delist {
  382.    $mailist->delete( 0.0, "end" );
  383. }
  384.  
  385. sub spamnow {
  386.  
  387.    $console->delete( 0.1, "end" );
  388.  
  389.    my $control = "0";
  390.  
  391.    my $msg = Net::SMTP::SSL->new( "smtp.gmail.com", Port => 465 );
  392.    if ( $msg->auth( $user->get, $pass->get ) ) {
  393.        $control = "1";
  394.    }
  395.    else {
  396.        $control = "0";
  397.    }
  398.    $msg->quit();
  399.  
  400.    if ($control) {
  401.  
  402.        $console->insert( "end", "[+] Starting the Party\n\n" );
  403.  
  404.        my @mails = $mailist->get( "0.0", "end" );
  405.        chomp @mails;
  406.        for my $mail (@mails) {
  407.            $ve->update;
  408.            $console->insert( "end", "[+] Mail : $mail\n" );
  409.  
  410.            my $text = $body->get( "1.0", "end" );
  411.  
  412.            if ( $fi->get eq "None" ) {
  413.                singlemail( $user->get, $pass->get, $mail, $tema->get, $text,
  414.                    $number->get );
  415.            }
  416.            else {
  417.                singlemailwithfile( $user->get, $pass->get, $mail, $tema->get,
  418.                    $text, $fi->get, $number->get );
  419.            }
  420.        }
  421.        $console->insert( "end", "\n\n[+] Finished" );
  422.    }
  423.    else {
  424.        $console->insert( "end", "[-] Bad Login\n" );
  425.    }
  426. }
  427.  
  428. sub singlemail {
  429.  
  430.    my ( $user, $password, $target, $asunto, $mensaje, $cantidad ) = @_;
  431.  
  432.    for ( 1 .. $cantidad ) {
  433.        my $msg = Net::SMTP::SSL->new( "smtp.gmail.com", Port => 465 );
  434.        $msg->auth( $user, $password );
  435.        $msg->mail( $user . "\n" );
  436.        $msg->to( $target . "\n" );
  437.        $msg->data();
  438.        $msg->datasend( "From: " . $user . "\n" );
  439.        $msg->datasend( "To: " . $target . "\n" );
  440.        $msg->datasend( "Subject: " . $asunto . "\n" );
  441.        $msg->datasend("Content-Type: text/html \n");
  442.        $msg->datasend("\n");
  443.        $msg->datasend( $mensaje . "\n" );
  444.        $msg->dataend();
  445.        $msg->quit();
  446.    }
  447. }
  448.  
  449. sub singlemailwithfile {
  450.  
  451.    my ( $user, $password, $target, $asunto, $mensaje, $file, $cantidad ) = @_;
  452.  
  453.    my $mail = Email::Send::SMTP::Gmail->new(
  454.        -smtp  => "gmail.com",
  455.        -login => $user,
  456.        -pass  => $password
  457.    );
  458.    for my $number ( 1 .. $cantidad ) {
  459.        $mail->send(
  460.            -to          => $target,
  461.            -subject     => $asunto,
  462.            -body        => $mensaje,
  463.            -attachments => $file
  464.        );
  465.    }
  466.    $mail->bye;
  467. }
  468.  
  469. sub clean {
  470.  
  471.    $user->configure( -text => " " );
  472.    $pass->configure( -text => " " );
  473.    $number->configure( -text => " " );
  474.    $fi->configure( -text => "None" );
  475.    $tema->configure( -text => " " );
  476.    $body->delete( 0.1, "end" );
  477.    $mailist->delete( 0.0, "end" );
  478.    $console->delete( 0.1, "end" );
  479.  
  480. }
  481.  
  482. sub about {
  483.    $about = MainWindow->new( -background => "black" );
  484.    $about->title("About");
  485.    $about->geometry("300x110");
  486.    $about->resizable( 0, 0 );
  487.    $about->Label( -background => "black", -foreground => "white" )->pack();
  488.    $about->Label(
  489.        -text       => "Contact : lepuke[at]hotmail[com]",
  490.        -font       => "Impact",
  491.        -background => "black",
  492.        -foreground => "white"
  493.    )->pack();
  494.    $about->Label(
  495.        -text       => "Web : doddyhackman.webcindario.com",
  496.        -font       => "Impact",
  497.        -background => "black",
  498.        -foreground => "white"
  499.    )->pack();
  500.    $about->Label(
  501.        -text       => "Blog : doddy-hackman.blogspot.com",
  502.        -font       => "Impact",
  503.        -background => "black",
  504.        -foreground => "white"
  505.    )->pack();
  506. }
  507.  
  508. sub chali { exit(1); }
  509.  
  510. #The End ?
  511.  
  512.  


« Última modificación: 1 Marzo 2012, 22:24 pm por Doddy » En línea

.:UND3R:.
Moderador Global
***
Desconectado Desconectado

Mensajes: 3.118


Ingeniería inversa / MASM


Ver Perfil WWW
Re: [Perl] DH Spammer 0.1
« Respuesta #1 en: 2 Marzo 2012, 17:53 pm »

Hola, muy bueno pero yo le agregaría la opción de aleatorio subjet y mensaje

ya que si se envía siempre el mismo título junto con el mismo mensaje, lo más probable es que se considere como correo no deseado.

Saludos


En línea


Solicitudes de crack, keygen, serial solo a través de mensajes privados (PM)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
Re: [Perl] DH Spammer 0.1
« Respuesta #2 en: 2 Marzo 2012, 19:23 pm »

no se me habia ocurrido eso , gracias por la sugerencia.
En línea

H20-X

Desconectado Desconectado

Mensajes: 83


Ver Perfil
Re: [Perl] DH Spammer 0.1
« Respuesta #3 en: 4 Marzo 2012, 19:56 pm »

que pena que no sea en py o en rb a mi en perl no me va :-\
En línea

BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
Re: [Perl] DH Spammer 0.1
« Respuesta #4 en: 5 Marzo 2012, 02:04 am »

que pena que no sea en py o en rb a mi en perl no me va :-\

al principio tenia pensado hacerlo en Python pero en Perl hay un modulo llamado Email::Send::SMTP::Gmail que me tiene todo el tema de envio de mails resumido.
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Spammer V1.2 « 1 2 3 4 5 »
.NET (C#, VB.NET, ASP)
Braayhaan 41 21,684 Último mensaje 2 Septiembre 2009, 02:05 am
por Braayhaan
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 3,847 Último mensaje 18 Mayo 2011, 21:49 pm
por madpitbull_99
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines