星星博客's Archiver

cnangel 发表于 2005-8-24 14:01

perl 域名查询程序

[color=red]作者:飞鸟
email: [email]flybird@chinaasp.com[/email]
日期:2000-9-22 17:20:25[/color]
#  perl 国内域名查询程序
#  flybird@chinaasp.com
#  2000-9-22
#  perl 写socket程序确实很简单。
[code]
use IO::Socket::INET;
$fqdn   = "ourstory.com.cn";
$server = "whois.cnnic.net.cn";
$sock   = IO::Socket::INET->new("$server:43") || die "fail";
print $sock "$fqdn\n";
@ret    = <&#36;sock>;
print "@ret";  
[/code]

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.