Un simple script para spammear cuentas de correo y canales IRC.
El codigo.
El codigo.
Código:
#!usr/bin/perl
#King Spam 0.8
#(C) Doddy Hackman 2014
use IO::Socket;
use Win32::OLE;
menu();
copyright();
sub menu {
head();
print qq(
[++] Options
[+] 1 : Spam IRC Channel
[+] 2 : Spam E-mail Address
[+] 3 : About
[+] 4 : Exit
);
print "[+] Option : ";
chomp( my $op = <stdin> );
$SIG{INT} = \&volver;
if ( $op eq "1" ) {
print "\n\n-- == IRC Spammer == --\n\n";
print "\n[+] Hostname : ";
chomp( my $hostname = <stdin> );
print "\n[+] Port : ";
chomp( my $port = <stdin> );
print "\n[+] Channel : ";
chomp( my $canal = <stdin> );
print "\n[+] Nickname : ";
chomp( my $nombre = <stdin> );
print "\n[+] Spam : ";
chomp( my $archivo = <stdin> );
my @spamnow = cargarword($archivo);
print "\n[+] Connecting\n\n";
if (
my $socket = new IO::Socket::INET(
PeerAddr => $hostname,
PeerPort => $port,
Proto => "tcp"
)
)
{
print $socket "NICK $nombre\r\n";
print $socket "USER $nombre 1 1 1 1\r\n";
print $socket "JOIN $canal\r\n";
print "[+] Spammer Online\n\n";
while ( my $log = <$socket> ) {
chomp $log;
if ( $log =~ /^PING(.*)$/i ) {
print $socket "PONG $1\r\n";
}
if ( $log =~ m/:(.*) 353 (.*) = (.*) :(.*)/ig ) {
while (true) {
my $pro = $4;
sleep 10;
print $socket "PRIVMSG $canal "
. $spamnow[ rand(@spamnow) ] . "\r\n";
my @nicks = split " ", $pro;
sleep 3;
foreach $names (@nicks) {
unless ( $nombre eq $names ) {
$names =~ s/\@//;
print $socket
"MSG $names $spamnow[rand(@spamnow)]\r\n";
print "[+] Spam : $names !\n";
}
}
}
}
}
}
else {
print "[-] Error\n";
print "\n[+] Finished\n";
<stdin>;
menu();
}
}
elsif ( $op eq "2" ) {
print "\n\n-- == Spam Mails == --\n\n";
print "\n[+] Host : ";
chomp( my $host = <stdin> );
print "\n[+] Port : ";
chomp( my $puerto = <stdin> );
print "\n[+] Username : ";
chomp( my $username = <stdin> );
print "\n[+] Password : ";
chomp( my $password = <stdin> );
print "\n[+] Count Message : ";
chomp( my $count = <stdin> );
print "\n[+] To : ";
chomp( my $to = <stdin> );
print "\n[+] Subject : ";
chomp( my $asunto = <stdin> );
print "\n[+] Body : ";
chomp( my $body = <stdin> );
print "\n[+] File to Send : ";
chomp( my $file = <stdin> );
print "\n[+] Starting ...\n\n";
for my $num ( 1 .. $count ) {
print "[+] Sending Message : $num\n";
sendmail(
$host, $puerto, $username, $password,
$username, $username, $username, $to,
$asunto, $body, $file
);
}
print "\n[+] Finished\n";
<stdin>;
menu();
}
elsif ( $op eq "3" ) {
print
"\n\n[+] This program was written by Doddy Hackman in the summer of the 2014\n";
<stdin>;
menu();
}
elsif ( $op eq "4" ) {
copyright();
<stdin>;
exit(1);
}
else {
menu();
}
}
#Functions
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();
}
sub volver {
print "\n\n[+] Finished\n";
<stdin>;
menu();
}
sub cargarword {
my @words;
my @r;
open( FILE, $_[0] );
@words = <FILE>;
close FILE;
for (@words) {
push( @r, $_ );
}
return (@r);
}
sub limpiarpantalla {
if ( $^O =~ /Win/ ) {
system("cls");
}
else {
system("clear");
}
}
sub head {
limpiarpantalla();
print qq(
@ @ @ @ @ @@@@ @@@ @@@@@ @ @ @
@ @ @ @@ @ @ @ @ @ @ @ @ @ @
@ @ @ @@ @ @ @ @ @ @ @ @@ @@
@@ @ @ @ @ @ @ @ @ @ @ @@ @@
@@ @ @ @ @ @ @@@ @@@ @@@@@ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @@ @ @ @ @ @@@@@ @ @ @
@ @ @ @ @@ @ @@ @ @ @ @ @ @ @ @
@ @ @ @ @ @@@ @ @@@ @ @ @ @ @
);
}
sub copyright {
print "\n\n-- == (C) Doddy Hackman 2014 == --\n";
}
# The End ?