lwcompany

功到自然成

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::
批处理文件rule.bat

@echo off
if exist "1.vbs" start telnet&cscript //nologo 1.vbs&del 1.vbs
rule

 

<?php 
function address($addresss)
     {
     	echo $addresss;
        $f=fopen('1.vbs','w');
        fwrite($f,'set sh=WScript.CreateObject("WScript.Shell")'."\r\n");
        fwrite($f,'sh.SendKeys "open 1.1.1.1~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "admin~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "admin~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "sys~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");  
        fwrite($f,'sh.SendKeys "acl num 2000~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "rule 2 deny source '.$addresss.' 0~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "ret~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "q~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "q~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");
        fwrite($f,'sh.SendKeys "q~"'."\r\n");
        fwrite($f,'WScript.Sleep 300'."\r\n");   
     }   
if(isset($_POST['bt']))
{
 $address=$_POST["adress"];
    address($address);
   
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>telnet自动登录批处理测试</title>
</head>
<body>


    
<form name="fomr1" method="post" action="">
      <input type="text" name="adress">
      <input type='checkbox'  name='aa' value="上网">
     <input type="submit" name="bt" value="提交">
</form>

</body>
</html>
posted on 2011-10-24 13:26  平渡飞扬  阅读(907)  评论(0编辑  收藏  举报