phptelnet连接

时间:2011-10-30 21:47:53

标签: php telnet

PHPTelnet始终返回

[PHP Telnet] Connect failed: Login failed"

但所有登录和密码都绝对正确。我已在本地电脑和synology NAS服务器phgtelnet上检查了set_time_limit(0) $telnet = new PHPTelnet(); $telnet->show_connect_error=0; // if the first argument to Connect is blank, // PHPTelnet will connect to the local host via 127.0.0.1 $result = $telnet->Connect('172.16.1.1','admin','admin'); switch ($result) { case 0: $telnet->DoCommand('uname', $result); // NOTE: $result may contain newlines echo $result; // say Disconnect(0); to break the connection without explicitly logging out $telnet->Disconnect(); break; case 1: echo '[PHP Telnet] Connect failed: Unable to open network connection'; break; case 2: echo '[PHP Telnet] Connect failed: Unknown host'; break; case 3: echo '[PHP Telnet] Connect failed: Login failed'; break; case 4: echo '[PHP Telnet] Connect failed: Your PHP version does not support PHP Telnet'; break; } ?> ,但行为相同。

有什么建议吗?

http://www.geckotribe.com/php-telnet/

下载的PHPTelnet.php类代码没什么特别之处

并调用脚本:     

Notice: fputs() [function.fputs]: send of 5 bytes failed with errno=10053 An established connection was aborted by the software in your host machine

启用ERROR_REPORTING后,我看到以下错误:

{{1}}

0 个答案:

没有答案