diff options
-rw-r--r-- | auth/telnet.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/auth/telnet.php b/auth/telnet.php index f490148..628e602 100644 --- a/auth/telnet.php +++ b/auth/telnet.php @@ -42,8 +42,8 @@ final class Telnet extends Authentication { throw new Exception('Cannot connect to router.'); } - fputs($this->connection, $this->config['user']."\r"); - fputs($this->connection, $this->config['pass']."\r"); + fputs($this->connection, $this->config['user']."\r\n"); + fputs($this->connection, $this->config['pass']."\r\n"); } public function send_command($command) { @@ -51,6 +51,8 @@ final class Telnet extends Authentication { $this->connect(); } + fputs($this->connection, $command."\r\n"); + $data = ''; while(!feof(!$this->connection)) { $data .= fread($this->connection, 4096); |