note 117816 added to function.ssh2-connect

From: Date: Thu, 13 Aug 2015 18:08:46 +0000
Subject: note 117816 added to function.ssh2-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-203336@lists.php.net to get a copy of this message
打开一次连接后,只能密码错误三次,第四次将出现奇特的异常。 <?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 段错误 (核心已转储) ---- Server IP: 72.52.91.14 Probable Submitter: 180.178.62.226 ---- Manual Page -- http://php.net/manual/en/function.ssh2-connect.php Edit -- https://master.php.net/note/edit/117816 Del: integrated -- https://master.php.net/note/delete/117816/integrated Del: useless -- https://master.php.net/note/delete/117816/useless Del: bad code -- https://master.php.net/note/delete/117816/bad+code Del: spam -- https://master.php.net/note/delete/117816/spam Del: non-english -- https://master.php.net/note/delete/117816/non-english Del: in docs -- https://master.php.net/note/delete/117816/in+docs Del: other reasons-- https://master.php.net/note/delete/117816 Reject -- https://master.php.net/note/reject/117816 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203336) next »