Property | Type | Description | |
---|---|---|---|
$bitmap | integer | The bits that are set represent functions that have been called already. This is used to determine if a requisite function has been successfully executed. If not, an error should be thrown. | |
$cipher | integer | Default cipher | |
$connectionTimeout | integer | Set by the constructor call. Calling setTimeout() is optional. If it's not called functions like exec() won't timeout unless some PHP setting forces it too. The timeout specified in the constructor, however, is non-optional. There will be a timeout, whether or not you set it. If you don't it'll be 10 seconds. It is used by fsockopen() in that function. | |
$crypto | object | The cryptography object | |
$curTimeout | Current Timeout | ||
$fsock | object | The Socket Object | |
$host | string | Hostname | |
$host_key_public_exponent | string | Logged for debug purposes | |
$host_key_public_modulus | string | Logged for debug purposes | |
$identifier | string | The SSH identifier | |
$interactiveBuffer | array | Interactive Buffer | |
$log_boundary | Log Boundary | ||
$log_long_width | Log Long Width | ||
$log_short_width | Log Short Width | ||
$message_log | array | Message Log | |
$port | integer | Port Number | |
$protocol_flag_log | array | Protocol Flag Log | |
$protocol_flags | array | Protocol Flags | |
$realtime_log_file | resource | Real-time log file pointer | |
$realtime_log_size | integer | Real-time log file size | |
$realtime_log_wrap | boolean | Real-time log file wrap boolean | |
$server_identification | string | Server Identification | |
$server_key_public_exponent | string | Logged for debug purposes | |
$server_key_public_modulus | string | Logged for debug purposes | |
$supported_authentications | array | Logged for debug purposes | |
$supported_ciphers | array | Logged for debug purposes | |
$timeout | Timeout |
Method | Description | |
---|---|---|
__construct ( string $host, integer $port = 22, integer $timeout = 10, integer $cipher = self::CIPHER_3DES ) : |
Default Constructor. | |
__destruct ( ) | Destructor. | |
_append_log ( $protocol_flags, $message ) | Logs data packets | |
_connect ( ) : boolean | Connect to an SSHv1 server | |
_crc ( string $data ) : integer | Cyclic Redundancy Check (CRC) | |
_define_array ( ) | Define Array | |
_disconnect ( string $msg = 'Client Quit' ) | Disconnect | |
_format_log ( array $message_log, array $message_number_log ) : string | Formats a log for printing | |
_format_log_helper ( array $matches ) : string | Helper function for _format_log | |
_get_binary_packet ( ) : array | Gets Binary Packets | |
_initShell ( ) : boolean | Creates an interactive shell | |
_rsa_crypt ( phpseclib\Math\BigInteger $m, array $key ) : phpseclib\Math\BigInteger | RSA Encrypt | |
_send_binary_packet ( string $data ) : boolean | Sends Binary Packets | |
disconnect ( ) | Disconnect | |
exec ( string $cmd, $block = true ) : mixed | Executes a command on a non-interactive shell, returns the output, and quits. | |
getHostKeyPublicExponent ( boolean $raw_output = false ) : string | Return the host key public exponent | |
getHostKeyPublicModulus ( boolean $raw_output = false ) : string | Return the host key public modulus | |
getLog ( ) : array | false | string | Returns a log of the packets that have been sent and received. | |
getServerIdentification ( ) : string | Return the server identification. | |
getServerKeyPublicExponent ( boolean $raw_output = false ) : string | Return the server key public exponent | |
getServerKeyPublicModulus ( boolean $raw_output = false ) : string | Return the server key public modulus | |
getSupportedAuthentications ( boolean $raw_output = false ) : array | Return a list of authentications supported by SSH1 server. | |
getSupportedCiphers ( boolean $raw_output = false ) : array | Return a list of ciphers supported by SSH1 server. | |
interactiveRead ( ) : string | Returns the output of an interactive shell when no more output is available. | |
interactiveWrite ( string $cmd ) : boolean | Inputs a command into an interactive shell. | |
login ( string $username, string $password = '' ) : boolean | Login | |
read ( string $expect, integer $mode = self::READ__SIMPLE ) : boolean | Returns the output of an interactive shell when there's a match for $expect | |
setTimeout ( mixed $timeout ) | Set Timeout | |
write ( string $cmd ) : boolean | Inputs a command into an interactive shell. |
public __destruct ( ) |
public _append_log ( $protocol_flags, $message ) |
public _define_array ( ) |
public _disconnect ( string $msg = 'Client Quit' ) | ||
$msg | string |
public _format_log_helper ( array $matches ) : string | ||
$matches | array | |
return | string |
public _get_binary_packet ( ) : array | ||
return | array |
public _initShell ( ) : boolean | ||
return | boolean |
public _rsa_crypt ( phpseclib\Math\BigInteger $m, array $key ) : phpseclib\Math\BigInteger | ||
$m | phpseclib\Math\BigInteger | |
$key | array | |
return | phpseclib\Math\BigInteger |
public _send_binary_packet ( string $data ) : boolean | ||
$data | string | |
return | boolean |
public getHostKeyPublicExponent ( boolean $raw_output = false ) : string | ||
$raw_output | boolean | |
return | string |
public getHostKeyPublicModulus ( boolean $raw_output = false ) : string | ||
$raw_output | boolean | |
return | string |
public getServerIdentification ( ) : string | ||
return | string |
public getServerKeyPublicExponent ( boolean $raw_output = false ) : string | ||
$raw_output | boolean | |
return | string |
public getServerKeyPublicModulus ( boolean $raw_output = false ) : string | ||
$raw_output | boolean | |
return | string |
public getSupportedAuthentications ( boolean $raw_output = false ) : array | ||
$raw_output | boolean | |
return | array |
public getSupportedCiphers ( boolean $raw_output = false ) : array | ||
$raw_output | boolean | |
return | array |
public interactiveRead ( ) : string | ||
return | string |
public interactiveWrite ( string $cmd ) : boolean | ||
$cmd | string | |
return | boolean |
public setTimeout ( mixed $timeout ) | ||
$timeout | mixed |
public int $bitmap | ||
return | integer |
public int $connectionTimeout | ||
return | integer |
public string $host_key_public_exponent | ||
return | string |
public string $host_key_public_modulus | ||
return | string |
public resource $realtime_log_file | ||
return | resource |
public int $realtime_log_size | ||
return | integer |
public bool $realtime_log_wrap | ||
return | boolean |
public string $server_identification | ||
return | string |
public string $server_key_public_exponent | ||
return | string |
public string $server_key_public_modulus | ||
return | string |
public array $supported_authentications | ||
return | array |
public array $supported_ciphers | ||
return | array |