From 73f0886e8717a44837dfd7cb56bee9a25c902686 Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Thu, 31 Mar 2011 09:37:24 +0000 Subject: [PATCH] - show first byte if message type is unknown to assist with diagnosis git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@149 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Net/SSH2.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index f1f5d8c1..8b4a47f7 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1535,7 +1535,6 @@ class Net_SSH2 { $part2 = pack('Na*Na*', strlen('ssh-rsa'), 'ssh-rsa', strlen($publickey), $publickey); $packet = $part1 . chr(0) . $part2; - if (!$this->_send_binary_packet($packet)) { return false; } @@ -1890,7 +1889,7 @@ class Net_SSH2 { $this->get_seq_no++; if (defined('NET_SSH2_LOGGING')) { - $temp = isset($this->message_numbers[ord($payload[0])]) ? $this->message_numbers[ord($payload[0])] : 'UNKNOWN'; + $temp = isset($this->message_numbers[ord($payload[0])]) ? $this->message_numbers[ord($payload[0])] : 'UNKNOWN (' . ord($payload[0]) . ')'; $this->message_number_log[] = '<- ' . $temp . ' (' . round($stop - $start, 4) . 's)'; if (NET_SSH2_LOGGING == NET_SSH2_LOG_COMPLEX) { @@ -2161,7 +2160,7 @@ class Net_SSH2 { $stop = strtok(microtime(), ' ') + strtok(''); if (defined('NET_SSH2_LOGGING')) { - $temp = isset($this->message_numbers[ord($data[0])]) ? $this->message_numbers[ord($data[0])] : 'UNKNOWN'; + $temp = isset($this->message_numbers[ord($data[0])]) ? $this->message_numbers[ord($data[0])] : 'UNKNOWN (' . ord($data[0]) . ')'; $this->message_number_log[] = '-> ' . $temp . ' (' . round($stop - $start, 4) . 's)'; if (NET_SSH2_LOGGING == NET_SSH2_LOG_COMPLEX) {