#!/usr/bin/perl

use IO::File;
use IO::Socket;

my $server = shift;
my $fh = IO::Socket::INET->new($server);
my $line = <$fh>;

print $line."\n";

測試結果:

#./lget.pl www.ccu.edu.tw:ftp

220 ProFTPD 1.3.1 Server (ProFTPD Default Installation) [140.123.5.5]

^^ 太easy了..

sclin by 淳

sclin0323 發表在 痞客邦 PIXNET 留言(0) 人氣()