|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Collaboration diagram for phpseclib\Net\SCP:Public Member Functions | |
| __construct ($ssh) | |
| Default Constructor. More... | |
| put ($remote_file, $data, $mode=self::SOURCE_STRING, $callback=null) | |
| Uploads a file to the SCP server. More... | |
| get ($remote_file, $local_file=false) | |
| Downloads a file from the SCP server. More... | |
| _send ($data) | |
| Sends a packet to an SSH server. More... | |
| _receive () | |
| Receives a packet from an SSH server. More... | |
| _close () | |
| Closes the connection to an SSH server. More... | |
Data Fields | |
| const | SOURCE_LOCAL_FILE = 1 |
| #+ @access public More... | |
| const | SOURCE_STRING = 2 |
| Reads data from a string. More... | |
| const | MODE_SSH1 = 1 |
| #- More... | |
| const | MODE_SSH2 = 2 |
| SSH2 is being used. More... | |
| $ssh | |
| $packet_size | |
| $mode | |
| phpseclib\Net\SCP::__construct | ( | $ssh | ) |
Default Constructor.
Connects to an SSH server
| string | $host | |
| int | $port | |
| int | $timeout |
Definition at line 111 of file SCP.php.
References phpseclib\Net\SCP\$ssh, phpseclib\Net\SCP\MODE_SSH1, and phpseclib\Net\SCP\MODE_SSH2.
| phpseclib\Net\SCP::_close | ( | ) |
Closes the connection to an SSH server.
@access private
Definition at line 329 of file SCP.php.
References phpseclib\Net\SSH2\CHANNEL_EXEC, phpseclib\Net\SCP\MODE_SSH1, and phpseclib\Net\SCP\MODE_SSH2.
Referenced by phpseclib\Net\SCP\get(), and phpseclib\Net\SCP\put().
Here is the caller graph for this function:| phpseclib\Net\SCP::_receive | ( | ) |
Receives a packet from an SSH server.
Definition at line 294 of file SCP.php.
References $response, phpseclib\Net\SSH2\CHANNEL_EXEC, phpseclib\Net\SCP\MODE_SSH1, phpseclib\Net\SCP\MODE_SSH2, phpseclib\Net\SSH1\RESPONSE_DATA, and phpseclib\Net\SSH1\RESPONSE_TYPE.
Referenced by phpseclib\Net\SCP\get(), and phpseclib\Net\SCP\put().
Here is the caller graph for this function:| phpseclib\Net\SCP::_send | ( | $data | ) |
Sends a packet to an SSH server.
| string | $data | @access private |
Definition at line 276 of file SCP.php.
References $data, phpseclib\Net\SSH2\CHANNEL_EXEC, phpseclib\Net\SCP\MODE_SSH1, and phpseclib\Net\SCP\MODE_SSH2.
Referenced by phpseclib\Net\SCP\get(), and phpseclib\Net\SCP\put().
Here is the caller graph for this function:| phpseclib\Net\SCP::get | ( | $remote_file, | |
$local_file = false |
|||
| ) |
Downloads a file from the SCP server.
Returns a string containing the contents of $remote_file if $local_file is left undefined or a boolean false if the operation was unsuccessful. If $local_file is defined, returns true or false depending on the success of the operation
| string | $remote_file | |
| string | $local_file |
Definition at line 220 of file SCP.php.
References $data, $info, $size, phpseclib\Net\SCP\_close(), phpseclib\Net\SCP\_receive(), and phpseclib\Net\SCP\_send().
Here is the call graph for this function:| phpseclib\Net\SCP::put | ( | $remote_file, | |
| $data, | |||
$mode = self::SOURCE_STRING, |
|||
$callback = null |
|||
| ) |
Uploads a file to the SCP server.
By default, \phpseclib\Net\SCP::put() does not read from the local filesystem. $data is dumped directly into $remote_file. So, for example, if you set $data to 'filename.ext' and then do \phpseclib\Net\SCPget(), you will get a file, twelve bytes long, containing 'filename.ext' as its contents.
Setting $mode to self::SOURCE_LOCAL_FILE will change the above behavior. With self::SOURCE_LOCAL_FILE, $remote_file will contain as many bytes as filename.ext does on your local filesystem. If your filename.ext is 1MB then that is how large $remote_file will be, as well.
Currently, only binary mode is supported. As such, if the line endings need to be adjusted, you will need to take care of that, yourself.
| string | $remote_file | |
| string | $data | |
| int | $mode | |
| callable | $callback |
Definition at line 146 of file SCP.php.
References $data, phpseclib\Net\SCP\$mode, $size, phpseclib\Net\SCP\_close(), phpseclib\Net\SCP\_receive(), phpseclib\Net\SCP\_send(), and phpseclib\Net\SSH2\CHANNEL_EXEC.
Here is the call graph for this function:| phpseclib\Net\SCP::$mode |
Definition at line 98 of file SCP.php.
Referenced by phpseclib\Net\SCP\put().
| phpseclib\Net\SCP::$ssh |
Definition at line 82 of file SCP.php.
Referenced by phpseclib\Net\SCP\__construct().
| const phpseclib\Net\SCP::MODE_SSH1 = 1 |
#-
#+ @access private
Definition at line 69 of file SCP.php.
Referenced by phpseclib\Net\SCP\__construct(), phpseclib\Net\SCP\_close(), phpseclib\Net\SCP\_receive(), and phpseclib\Net\SCP\_send().
| const phpseclib\Net\SCP::MODE_SSH2 = 2 |
SSH2 is being used.
Definition at line 73 of file SCP.php.
Referenced by phpseclib\Net\SCP\__construct(), phpseclib\Net\SCP\_close(), phpseclib\Net\SCP\_receive(), and phpseclib\Net\SCP\_send().
| const phpseclib\Net\SCP::SOURCE_LOCAL_FILE = 1 |
| const phpseclib\Net\SCP::SOURCE_STRING = 2 |