- 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
#!usr/bin/perl #DH Spammer 0.1 #Coded By Doddy H #Dependencies #http://search.cpan.org/~peco/Email-Send-SMTP-Gmail-0.24/lib/Email/Send/SMTP/Gmail.pm #http://search.cpan.org/~cwest/Net-SMTP-SSL-1.01/lib/Net/SMTP/SSL.pm #http://search.cpan.org/~sullr/IO-Socket-SSL-1.54/SSL.pm #ppm install http://www.open.com.au/radiator/free-downloads/Net-SSLeay.ppd #http://search.cpan.org/~gbarr/Authen-SASL-2.15/lib/Authen/SASL.pod #Based on http://robertmaldon.blogspot.com/2006/10/sending-email-through-google-smtp-from.html use Tk; use Tk::ROText; use Tk::FileSelect; use Email::Send::SMTP::Gmail; use Net::SMTP::SSL; use Cwd; if ( $^O eq 'MSWin32' ) { use Win32::Console; Win32::Console::Free(); } my $color_fondo = "black"; my $color_texto = "white"; my $ve = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ve->geometry("920x560+20+20"); $ve->resizable( 0, 0 ); $ve->title("DH Spammer 0.1 (C) Doddy Hackman 2012"); $d = $ve->Frame( -relief => "sunken", -bd => 1, -background => $color_fondo, -foreground => $color_texto ); my $ma = $d->Menubutton( -text => "Mails", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); my $op = $d->Menubutton( -text => "Options", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); my $ab = $d->Menubutton( -text => "About", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); my $ex = $d->Menubutton( -text => "Exit", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); $d->pack( -side => "top", -fill => "x" ); $ma->command( -label => "Add Mailist", -background => $color_fondo, -foreground => $color_texto, -command => \&addmailist ); $ma->command( -label => "Add Mail", -background => $color_fondo, -foreground => $color_texto, -command => \&addmail ); $ma->command( -label => "Clean List", -background => $color_fondo, -foreground => $color_texto, -command => \&delist ); $op->command( -label => "Spam Now", -background => $color_fondo, -foreground => $color_texto, -command => \&spamnow ); $op->command( -label => "Add Attachment", -background => $color_fondo, -foreground => $color_texto, -command => \&addfile ); $op->command( -label => "Clean All", -background => $color_fondo, -foreground => $color_texto, -command => \&clean ); $ab->command( -label => "About", -background => $color_fondo, -foreground => $color_texto, -command => \&about ); $ex->command( -label => "Exit", -background => $color_fondo, -foreground => $color_texto, -command => \&chali ); $ve->Label( -text => "Gmail Login", -font => "Impact3", -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Username : ", -background => $color_fondo, -foreground => $color_texto my $user = $ve->Entry( -width => 30, -text => 'lagartojuancho@gmail.com', -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Password : ", -background => $color_fondo, -foreground => $color_texto my $pass = $ve->Entry( -show => "*", -width => 30, -text => 'Secret', -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Message", -font => "Impact3", -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Number : ", -background => $color_fondo, -foreground => $color_texto my $number = $ve->Entry( -width => 5, -text => "1", -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Attachment : ", -background => $color_fondo, -foreground => $color_texto my $fi = $ve->Entry( -text => 'None', -width => 30, -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Subject : ", -background => $color_fondo, -foreground => $color_texto my $tema = $ve->Entry( -text => "Hi idiot", -width => 20, -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Body", -font => "Impact3", -background => $color_fondo, -foreground => $color_texto my $body = $ve->Scrolled( "Text", -width => 30, -height => 12, -background => $color_fondo, -foreground => $color_texto, -scrollbars => "e" $body->insert( "end", "Welcome to the hell" ); $ve->Label( -text => "Mailist", -font => "Impact3", -background => $color_fondo, -foreground => $color_texto my $mailist = $ve->Listbox( -height => 31, -width => 33, -background => $color_fondo, -foreground => $color_texto $ve->Label( -text => "Console", -font => "Impact3", -background => $color_fondo, -foreground => $color_texto my $console = $ve->Scrolled( "ROText", -width => 40, -height => 31, -background => $color_fondo, -foreground => $color_texto, -scrollbars => "e" MainLoop; sub addmailist { my $adda = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $adda->geometry("400x90+20+20"); $adda->resizable( 0, 0 ); $adda->title("Add Mailist"); $adda->Label( -text => "Mailist : ", -background => $color_fondo, -foreground => $color_texto, -font => "Impact1" my $en = $adda->Entry( -background => $color_fondo, -foreground => $color_texto, -width => 33 $adda->Button( -text => "Browse", -background => $color_fondo, -foreground => $color_texto, -width => 7, -activebackground => $color_texto, -command => \&brona $adda->Button( -text => "Load", -background => $color_fondo, -foreground => $color_texto, -width => 7, -activebackground => $color_texto, -command => \&bronaxa sub brona { $browse = $adda->FileSelect( -directory => getcwd() ); my $file = $browse->Show; $en->configure( -text => $file ); } sub bronaxa { @words = <FILE>; close FILE; for (@words) { $mailist->insert( "end", $_ ); } } } sub addfile { my $addax = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $addax->geometry("390x90+20+20"); $addax->resizable( 0, 0 ); $addax->title("Add File"); $addax->Label( -text => "File : ", -background => $color_fondo, -foreground => $color_texto, -font => "Impact1" my $enaf = $addax->Entry( -background => $color_fondo, -foreground => $color_texto, -width => 33 $addax->Button( -text => "Browse", -background => $color_fondo, -foreground => $color_texto, -width => 7, -activebackground => $color_texto, -command => \&bronax $addax->Button( -text => "Load", -background => $color_fondo, -foreground => $color_texto, -width => 7, -activebackground => $color_texto, -command => \&bronaxx sub bronax { $browse = $addax->FileSelect( -directory => getcwd() ); my $filea = $browse->Show; $enaf->configure( -text => $filea ); } sub bronaxx { $fi->configure( -text => $enaf->get ); } } sub addmail { my $add = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $add->geometry("350x90+20+20"); $add->resizable( 0, 0 ); $add->title("Add Mail"); $add->Label( -text => "Mail : ", -background => $color_fondo, -foreground => $color_texto, -font => "Impact1" my $ew = $add->Entry( -background => $color_fondo, -foreground => $color_texto, -width => 33 $add->Button( -text => "Add", -background => $color_fondo, -activebackground => $color_texto, -foreground => $color_texto, -width => 7, -command => \&addnow sub addnow { $mailist->insert( "end", $ew->get ); } } sub delist { $mailist->delete( 0.0, "end" ); } sub spamnow { $console->delete( 0.1, "end" ); my $control = "0"; my $msg = Net::SMTP::SSL->new( "smtp.gmail.com", Port => 465 ); if ( $msg->auth( $user->get, $pass->get ) ) { $control = "1"; } else { $control = "0"; } $msg->quit(); if ($control) { $console->insert( "end", "[+] Starting the Party\n\n" ); my @mails = $mailist->get( "0.0", "end" ); for my $mail (@mails) { $ve->update; $console->insert( "end", "[+] Mail : $mail\n" ); my $text = $body->get( "1.0", "end" ); if ( $fi->get eq "None" ) { singlemail( $user->get, $pass->get, $mail, $tema->get, $text, $number->get ); } else { singlemailwithfile( $user->get, $pass->get, $mail, $tema->get, $text, $fi->get, $number->get ); } } $console->insert( "end", "\n\n[+] Finished" ); } else { $console->insert( "end", "[-] Bad Login\n" ); } } sub singlemail { my ( $user, $password, $target, $asunto, $mensaje, $cantidad ) = @_; for ( 1 .. $cantidad ) { my $msg = Net::SMTP::SSL->new( "smtp.gmail.com", Port => 465 ); $msg->auth( $user, $password ); $msg->mail( $user . "\n" ); $msg->to( $target . "\n" ); $msg->data(); $msg->datasend( "From: " . $user . "\n" ); $msg->datasend( "To: " . $target . "\n" ); $msg->datasend( "Subject: " . $asunto . "\n" ); $msg->datasend("Content-Type: text/html \n"); $msg->datasend("\n"); $msg->datasend( $mensaje . "\n" ); $msg->dataend(); $msg->quit(); } } sub singlemailwithfile { my ( $user, $password, $target, $asunto, $mensaje, $file, $cantidad ) = @_; my $mail = Email::Send::SMTP::Gmail->new( -smtp => "gmail.com", -login => $user, -pass => $password ); for my $number ( 1 .. $cantidad ) { $mail->send( -to => $target, -subject => $asunto, -body => $mensaje, -attachments => $file ); } $mail->bye; } sub clean { $user->configure( -text => " " ); $pass->configure( -text => " " ); $number->configure( -text => " " ); $fi->configure( -text => "None" ); $tema->configure( -text => " " ); $body->delete( 0.1, "end" ); $mailist->delete( 0.0, "end" ); $console->delete( 0.1, "end" ); } sub about { $about = MainWindow->new( -background => "black" ); $about->title("About"); $about->geometry("300x110"); $about->resizable( 0, 0 ); $about->Label( -background => "black", -foreground => "white" )->pack(); $about->Label( -text => "Contact : lepuke[at]hotmail[com]", -font => "Impact", -background => "black", -foreground => "white" )->pack(); $about->Label( -text => "Web : doddyhackman.webcindario.com", -font => "Impact", -background => "black", -foreground => "white" )->pack(); $about->Label( -text => "Blog : doddy-hackman.blogspot.com", -font => "Impact", -background => "black", -foreground => "white" )->pack(); } #The End ?