Skip to content
Permalink
Browse files

Move from phpseclib version 1 to phpseclib version 2.

  • Loading branch information...
respawner committed Aug 10, 2019
1 parent 439f7fd commit cb1c8b6b85ab144aa83121a7a23875e9f340f788
Showing with 35,067 additions and 35,617 deletions.
  1. +11 −4 auth/ssh.php
  2. +445 −0 libs/ClassLoader.php
  3. +0 −197 libs/phpseclib-1.0.14/Crypt/AES.php
  4. +0 −561 libs/phpseclib-1.0.14/System/SSH/Agent.php
  5. +0 −39 libs/phpseclib-1.0.14/System/SSH_Agent.php
  6. +126 −0 libs/phpseclib-2.0.21/Crypt/AES.php
  7. +2,708 −2,660 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/Base.php
  8. +571 −644 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/Blowfish.php
  9. +1,443 −1,516 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/DES.php
  10. +894 −922 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/Hash.php
  11. +688 −761 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/RC2.php
  12. +342 −366 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/RC4.php
  13. +3,201 −3,142 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/RSA.php
  14. +274 −338 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/Random.php
  15. +936 −1,050 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/Rijndael.php
  16. +460 −517 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/TripleDES.php
  17. +816 −889 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Crypt/Twofish.php
  18. +577 −604 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/File/ANSI.php
  19. +1,403 −1,485 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/File/ASN1.php
  20. +47 −0 libs/phpseclib-2.0.21/File/ASN1/Element.php
  21. +5,056 −5,145 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/File/X509.php
  22. +3,779 −3,812 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Math/BigInteger.php
  23. +342 −373 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Net/SCP.php
  24. +3,154 −3,171 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Net/SFTP.php
  25. +795 −815 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Net/SFTP/Stream.php
  26. +1,642 −1,691 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Net/SSH1.php
  27. +4,793 −4,893 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/Net/SSH2.php
  28. +312 −0 libs/phpseclib-2.0.21/System/SSH/Agent.php
  29. +230 −0 libs/phpseclib-2.0.21/System/SSH/Agent/Identity.php
  30. +16 −16 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/bootstrap.php
  31. +6 −6 libs/{phpseclib-1.0.14 → phpseclib-2.0.21}/openssl.cnf
@@ -19,8 +19,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once('Crypt/RSA.php');
require_once('Net/SSH2.php');
include('libs/ClassLoader.php');
$loader = new \Composer\Autoload\ClassLoader();
$loader->addPsr4('phpseclib\\', 'libs/phpseclib-2.0.21');
$loader->register();
use phpseclib\Crypt\RSA;
use phpseclib\Net\SSH2;
require_once('authentication.php');
require_once('includes/utils.php');
@@ -56,14 +63,14 @@ protected function check_config() {
}
public function connect() {
$this->connection = new Net_SSH2($this->config['host'], $this->port);
$this->connection = new SSH2($this->config['host'], $this->port);
$this->connection->setTimeout($this->config['timeout']);
$success = false;
if ($this->config['auth'] == 'ssh-password') {
$success = $this->connection->login($this->config['user'], $this->config['pass']);
} else if ($this->config['auth'] == 'ssh-key') {
$key = new Crypt_RSA();
$key = new RSA();
if (isset($this->config['pass'])) {
$key->setPassword($this->config['pass']);

0 comments on commit cb1c8b6

Please sign in to comment.
You can’t perform that action at this time.