El codigo :
Código
#!usr/bin/perl #DH Bomber 0.2 #Coded By Doddy H use Win32::OLE; head(); for my $num ( 1 .. $count ) { sendmail( $host, $puerto, $username, $password, $username, $username, $username, $to, $asunto, $body, $file ); } copyright(); sub head { } sub copyright { } sub sendmail { ## Function Based on : http://code.activestate.com/lists/pdk/5351/ ## Credits : Thanks to Phillip Richcreek and Eric Promislow my ( $host, $port, $username, $password, $from, $cc, $bcc, $to, $asunto, $mensaje, $file ) = @_; $correo = Win32::OLE->new('CDO.Message'); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/sendusername', $username ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/sendpassword', $password ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpserver', $host ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpserverport', $port ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpusessl', 1 ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/sendusing', 2 ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpauthenticate', 1 ); $correo->Configuration->Fields->Update(); if ( -f $file ) { $correo->AddAttachment($file); } $correo->{From} = $from; $correo->{CC} = $cc; $correo->{BCC} = $bcc; $correo->{To} = $to; $correo->{Subject} = $asunto; $correo->{TextBody} = $mensaje; $correo->Send(); } # The End ?
Y aca les dejo la version Tk.
Una imagen :
El codigo :
Código
#!usr/bin/perl #DH Bomber 0.2 #Coded By Doddy H use Tk; use Tk::ROText; use Tk::FileSelect; use Cwd; use Win32::OLE; 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 Bomber 0.2 (C) Doddy Hackman 2013"); $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" ); $console->insert( "end", "[+] Starting the Party\n\n" ); my @mails = $mailist->get( "0.0", "end" ); for my $mail (@mails) { my $text = $body->get( "1.0", "end" ); if ( $fi->get eq "None" ) { for ( 1 .. $number->get ) { $ve->update; $console->insert( "end", "[+] Mail Number " . $_ . " to $mail\n" ); sendmail( "smtp.gmail.com", "465", $user->get, $pass->get, $user->get, $user->get, $user->get, $mail, $tema->get, $text, "" ); } } else { for ( 1 .. $number->get ) { $ve->update; $console->insert( "end", "[+] Mail Number " . $_ . " to $mail\n" ); sendmail( "smtp.gmail.com", "465", $user->get, $pass->get, $user->get, $user->get, $user->get, $mail, $tema->get, $text, $fi->get ); } } } $console->insert( "end", "\n\n[+] Finished" ); } 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(); } sub sendmail { ## Function Based on : http://code.activestate.com/lists/pdk/5351/ ## Credits : Thanks to Phillip Richcreek and Eric Promislow my ( $host, $port, $username, $password, $from, $cc, $bcc, $to, $asunto, $mensaje, $file ) = @_; $correo = Win32::OLE->new('CDO.Message'); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/sendusername', $username ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/sendpassword', $password ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpserver', $host ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpserverport', $port ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpusessl', 1 ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/sendusing', 2 ); $correo->Configuration->Fields->SetProperty( "Item", 'http://schemas.microsoft.com/cdo/configuration/smtpauthenticate', 1 ); $correo->Configuration->Fields->Update(); if ( -f $file ) { $correo->AddAttachment($file); } $correo->{From} = $from; $correo->{CC} = $cc; $correo->{BCC} = $bcc; $correo->{To} = $to; $correo->{Subject} = $asunto; $correo->{TextBody} = $mensaje; $correo->Send(); } #The End ?