mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-02 17:52:59 +01:00
SSH1: backport fixes from rrran
This commit is contained in:
parent
6922e6d476
commit
f68a85e99b
@ -916,7 +916,7 @@ class SSH1
|
||||
/**
|
||||
* Returns the output of an interactive shell when there's a match for $expect
|
||||
*
|
||||
* $expect can take the form of a string literal or, if $mode == self::READ__REGEX,
|
||||
* $expect can take the form of a string literal or, if $mode == self::READ_REGEX,
|
||||
* a regular expression.
|
||||
*
|
||||
* @see self::write()
|
||||
@ -925,7 +925,7 @@ class SSH1
|
||||
* @return bool
|
||||
* @access public
|
||||
*/
|
||||
function read($expect, $mode = self::READ__SIMPLE)
|
||||
function read($expect, $mode = self::READ_SIMPLE)
|
||||
{
|
||||
if (!($this->bitmap & self::MASK_LOGIN)) {
|
||||
user_error('Operation disallowed prior to login()');
|
||||
@ -939,7 +939,7 @@ class SSH1
|
||||
|
||||
$match = $expect;
|
||||
while (true) {
|
||||
if ($mode == self::READ__REGEX) {
|
||||
if ($mode == self::READ_REGEX) {
|
||||
preg_match($expect, $this->interactiveBuffer, $matches);
|
||||
$match = isset($matches[0]) ? $matches[0] : '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user