
16.09.2007, 13:13
|
|
Познающий
Регистрация: 11.04.2007
Сообщений: 43
Провел на форуме: 126798
Репутация:
37
|
|
Hi , I see people post they work here. There is 2 my coded perl scripts.
1. Port scanner:
Код:
#!/usr/bin/perl
# Website: http://saime.biz
# Usage: perl l33t.pl [ip]
use IO::Socket;
my ( $ip, $port, $endport );
$endport=1337; $port=0; # You can edit the endport ....
$ip = $ARGV[0] if $ARGV[0];
$port=$ARGV[1] if $ARGV[1];
$maxport=$ARGV[2] if $ARGV[2];
print "[+]Scaning: $ip\r\n";
foreach (; $port<=$endport; $port++) {
print "\n[+]Port $port is open!" if ( IO::Socket::INET->new(PeerAddr=>"$ip:$port",Proto=>'tcp',Timeout=>1));
}
exit;
2. IRC Bot.
Код:
#!/usr/bin/perl
# Options: !op , !kill , !version , !owner
# Website: http://saime.biz
print "http://saime.biz";
use strict;
use IO::Socket;
use Socket;
my $server = "irc.nitrousirc.net";
my $port= '6667';
my $chanel = "#perl";
my $nick = "King`Of`Noobs";
my $identify = "ohi";
my $name = "Hithere";
my $saime = "Saime";
my $socket = new IO::Socket::INET(PeerAddr => $server, PeerPort => $port, Proto => "tcp") or die "Get a life ?";
print $socket "NICK $nick\r\n";
print $socket "USER $identify 8 * :$name\r\n";
print $socket "JOIN $chanel\r\n";
while (my $body = <$socket>) {
chop $body;
if ($body =~ /^PING(.*)$/i) { print $socket "PONG $1\r\n"; }
if ($body =~ /^.*!version(.*)$/i) { print $socket ("PRIVMSG $chanel Saime's BOT V1.2!\r\n"); }
if ($body =~ /^.*!kill(.*)$/i) { print $socket ("QUIT\r\n"); }
if ($body =~ /^.*!op(.*)$/i) { print $socket ("MODE $chanel op $saime\r\n"); }
if ($body =~ /^.*!owner(.*)$/i) { print $socket ("PRIVMSG $chanel Owner: YourNick\r\n"); }
}
More to come later. 
|
|
|