note 117816 deleted from function.ssh2-connect by googleguy
| From: | googleguy@php.net | Date: | Thu, 13 Aug 2015 18:09:22 +0000 |
| Subject: | note 117816 deleted from function.ssh2-connect by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-203338@lists.php.net to get a copy of this message | ||
Note Submitter: whirlwind110 at 163 dot com
----
æå¼ä¸æ¬¡è¿æ¥åï¼åªè½å¯ç éè¯¯ä¸æ¬¡ï¼ç¬¬å次å°åºç°å¥ç¹çå¼å¸¸ã
<?php
$username="root";
$pwdarr =
array('ad','adadsa','sdf575','xsdddr','fdgt56');
$target="xxx.xxx.xxx.xxx";
$connection=ssh2_connect($target,22);
print("strating...\n");
foreach ($pwdarr as $password) {
$stime=microtime(true);
@ssh2_auth_password($connection,$username,$password);
$etime=microtime(true);
$time=$etime-$stime;
print("$password\nå
±ç¨æ¶".$time."\n");
}
?>
// Ubuntu ä¸
$ php ssh.php
strating...
ad
å
±ç¨æ¶1.6269960403442
adadsa
å
±ç¨æ¶2.2547791004181
sdf575
å
±ç¨æ¶2.1681230068207
段é误 (æ ¸å¿å·²è½¬å¨)