1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-02 17:48:00 +01:00
Commit Graph

65 Commits

Author SHA1 Message Date
Jim Wigginton
497df88951 - only log the last 1MB of an ssh transaction (this way logs can be obtained even when you're uploading terabytes and terabytes of data)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@165 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-04 17:06:53 +00:00
Jim Wigginton
332726db74 - if you want to use UTF-8 encoded passwords encode them as UTF-8 yourself (ie. save your PHP script as UTF-8 without BOM; thanks, gruberroland!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@160 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-29 14:43:17 +00:00
Jim Wigginton
34cdb781cc - update SSH1 logging and disconnecting
- add better support for an as-yet-to-be-written SCP class
- update example of read()

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@158 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-08 23:53:30 +00:00
Jim Wigginton
c6bc908f63 - suppress errors about empty strings being passed to crypto object
- fix a bug in read() that broke NET_SSH2_READ_REGEX

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@156 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-08 02:34:36 +00:00
Jim Wigginton
e42adbeaf9 - suppress errors when fread() times out
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@154 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-22 07:50:24 +00:00
Jim Wigginton
b614ab4dc0 - read(...) only returned first byte of matched string - not entire matched string
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@153 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-18 21:37:06 +00:00
Jim Wigginton
392d96445e - add support for PuTTY and XML formatted RSA keys
- remove ?>'s from PHP_Compat files
- update LICENSE block
- make it so NET_SSH2_MSG_USERAUTH_PK_OK records direction and time

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@152 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-18 12:17:40 +00:00
Jim Wigginton
73f0886e87 - 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
2011-03-31 09:37:24 +00:00
Jim Wigginton
458f4f7ef0 - add interactive mode support to Net_SSH2 and redo interactive support in Net_SSH1
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@147 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-28 05:24:09 +00:00
Jim Wigginton
13b8afd620 - update Net_SFTP to better support SCP
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@145 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-13 07:46:01 +00:00
Jim Wigginton
fb0f03c904 - added $block parameter to Net_SSH2::exec() (thanks jl_ewing!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@135 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-30 04:34:31 +00:00
Jim Wigginton
b94a467999 - change license to the less restrictive MIT license (if people want to modify phpseclib and distribute binaries of it [whatever that means for PHP] without including the source code I don't care); two of the three PHP_Compat stuff still uses the LGPL since I didn't author them but they're only needed, anyway, if you're using phpseclib on PHP4.
- add svn:eol-style: LF to all files
- fixed pear.php.net bug # 18037 (thanks, nounours!)

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@130 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-13 19:28:20 +00:00
Jim Wigginton
dd4f0036f2 - fixed a bug that prevented key re-exchange from working
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@126 21d32557-59b3-4da0-833f-c5933fad653e
2010-10-24 01:24:30 +00:00
Jim Wigginton
bbe68cf7ae - fixed a bug in keyboard-interactive authentication (thanks, j31!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@121 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-12 22:12:45 +00:00
Jim Wigginton
202c3b64e9 - added support for OFB and CFB modes (with the caveat that CFB mode isn't currently supported as a stream cipher)
- improvements to the fix to the bug Suby found
- fixed bug whereby CTR mode gave different results in mcrypt and internal modes when the continuous buffer was enabled and the plaintext being encrypted wasn't a multiple of the block size
- undid the fix for the bug f.dammassa found (thanks, j31!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@120 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-12 21:58:54 +00:00
Jim Wigginton
a8863e2b3d - included a work-around for a bug in Portable OpenSSH 4.4 and earlier whereby faulty key sizes are used for aes256-ctr, aes192-ctr and arcfour256 (thanks, f.dammassa!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@116 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-29 03:27:02 +00:00
Jim Wigginton
d07570b0eb - added limited support for keyboard-interactive authentication (thanks, j31!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@115 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-28 17:26:22 +00:00
Jim Wigginton
94f48a97d4 c -> C
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@109 21d32557-59b3-4da0-833f-c5933fad653e
2010-05-16 16:10:50 +00:00
Jim Wigginton
978a11607e - more useful error message if the server closes the connection after sending their identification string
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@108 21d32557-59b3-4da0-833f-c5933fad653e
2010-05-10 16:16:35 +00:00
Jim Wigginton
a33bc87e83 - SSH servers whose identification string had trailing spaces wouldn't calculate the exchange hash correctly (thanks voxo!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@107 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-27 21:29:36 +00:00
Jim Wigginton
068983328f - replace < with . in log output since < causes logs not to show up correctly in web browsers. could escape it, too, but then that'd potentially make CLI logs use more width than the terminal has
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@106 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-25 14:19:43 +00:00
Jim Wigginton
6057a9da8f - fixed a bug in Crypt_Random
- SSH2 logging now more closely resembles the format of PuTTY logs


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@105 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-24 06:40:49 +00:00
Jim Wigginton
b1566eed93 - signatures are now only verified if you're requesting the server host key since otherwise the sever could be using it's own made up host key and you'd never know
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@104 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-22 16:06:43 +00:00
Jim Wigginton
39c97d3373 - crypt_random() used /dev/urandom in a rather slow way (thanks, TangiX!)
- revamped the logging system.  now, you can profile SSH2.php / SFTP.php without capturing full logs


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@99 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-07 03:50:54 +00:00
Jim Wigginton
9a3c2e836b - added size() to Net_SFTP (thanks, Ethorsen!)
- adjusted encryption algorithm preferences for speed (thanks, TangiX!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@98 21d32557-59b3-4da0-833f-c5933fad653e
2010-04-04 00:20:03 +00:00
Jim Wigginton
71b960d082 - updated some comments
- fixed an E_NOTICE (thanks, Brion Vibber!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@96 21d32557-59b3-4da0-833f-c5933fad653e
2010-03-22 22:01:38 +00:00
Jim Wigginton
1a2b6e1087 - fixed two E_NOTICE errors (thanks, beanboots!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@92 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-27 23:34:46 +00:00
Jim Wigginton
374c68c312 - stderr produced by Net_SSH2::exec() calls is now treated the same as stdin data
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@87 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-15 22:24:08 +00:00
Jim Wigginton
76e4066e94 - improved error logging capability
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@86 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-12 23:02:13 +00:00
Jim Wigginton
61625bc8ab - hopefully better handling of lengthy sessions
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@84 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-11 07:02:51 +00:00
Jim Wigginton
d77c85218d - removed setMCrypt from the Crypt_* objects (you can achieve the same effect by doing ini_set('mcrypt.algorithms_dir', $path))
- added support for CTR mode to the various Crypt_* objects


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@83 21d32557-59b3-4da0-833f-c5933fad653e
2010-02-09 06:10:26 +00:00
Jim Wigginton
3ec7bdfcba - fixed a PHP5.3 warning in Net/SSH2.php
- fixed a bug introduced in the rewritten addition function


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@77 21d32557-59b3-4da0-833f-c5933fad653e
2010-01-21 07:33:05 +00:00
Jim Wigginton
e16ba96789 - fixed a few E_NOTICE errors
- sped up Math_BigInteger::_barrett()


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@73 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-31 06:11:07 +00:00
Jim Wigginton
0d69655512 - rm var $timeout
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@71 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-14 18:17:36 +00:00
Jim Wigginton
99c0e29fdf - fixed a bug in isPrime (thanks greyhoundx!)
- Net_SSH2::exec() should now be faster
- better channel management


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@70 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-14 18:14:54 +00:00
Jim Wigginton
9bd3c793d3 - an inability to unpad doesn't necessarily mean that padding is enabled when it shouldn't be - it might also mean that the key being used is the wrong one.
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@67 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-06 07:26:52 +00:00
Jim Wigginton
4fb22b711a - typo
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@63 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-03 19:04:10 +00:00
Jim Wigginton
a882a3a41f - added Crypt_RSA
- added RSA public key authentication to Net_SSH2


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@62 21d32557-59b3-4da0-833f-c5933fad653e
2009-12-03 08:19:00 +00:00
Jim Wigginton
9336c7f20d - $server_cookie can be assigned directly
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@60 21d32557-59b3-4da0-833f-c5933fad653e
2009-11-26 06:41:34 +00:00
Jim Wigginton
a4e72f7811 - replaced list(...) = unpack('...') calls with extract(unpack('...')) (thanks martinu!)
- added pure-php implementations of md2, sha256, and sha512 to Crypt_Hash
- added setPrecision() to Math_BigInteger
- other small fixes


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@56 21d32557-59b3-4da0-833f-c5933fad653e
2009-11-23 19:06:07 +00:00
Jim Wigginton
f50e880c41 - accommodate new Math_BigInteger updates
- fix a typo in Crypt_Rijndael's comments


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@54 21d32557-59b3-4da0-833f-c5933fad653e
2009-11-03 22:03:43 +00:00
Jim Wigginton
bf6787dd07 - getLog() returns additional debug info
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@51 21d32557-59b3-4da0-833f-c5933fad653e
2009-10-17 03:49:16 +00:00
Jim Wigginton
1284a0d7d8 - fixed a bug involving server / client channel assignments
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@50 21d32557-59b3-4da0-833f-c5933fad653e
2009-10-16 03:37:24 +00:00
Jim Wigginton
8b1265d27c - fixed an issue where by the modulos used in diffie-hellman key exchange could be off (thanks, sjarkie!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@47 21d32557-59b3-4da0-833f-c5933fad653e
2009-09-18 20:14:16 +00:00
Jim Wigginton
6516ba29a6 - better packet handling
- (hopefully) faster SFTP uploads


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@46 21d32557-59b3-4da0-833f-c5933fad653e
2009-09-17 03:19:20 +00:00
Jim Wigginton
df8844d12b - logs now contain timing information
- fixed a potential E_NOTICE error (thanks, Wang Xiaoguang!)


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@43 21d32557-59b3-4da0-833f-c5933fad653e
2009-08-29 19:23:25 +00:00
Jim Wigginton
5025807abf - fixed two E_NOTICE issues (thanks, amer and inventor!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@42 21d32557-59b3-4da0-833f-c5933fad653e
2009-08-23 03:40:50 +00:00
Jim Wigginton
d6339e014f - Net_SFTP now has better support for uploading large files than it did before, per this:
http://www.frostjedi.com/phpbb/viewtopic.php?f=46&t=10415


git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@40 21d32557-59b3-4da0-833f-c5933fad653e
2009-06-09 04:00:38 +00:00
Jim Wigginton
d1cacdf86f - Net_SSH2::login() didn't always return true when it should have
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@37 21d32557-59b3-4da0-833f-c5933fad653e
2009-05-30 16:40:31 +00:00
Jim Wigginton
41784adbc7 - attempting to connect to an invalid host yielded an inappropriate number of errors
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@36 21d32557-59b3-4da0-833f-c5933fad653e
2009-05-30 15:46:32 +00:00