Commit Graph

142 Commits

Author SHA1 Message Date
Andreas Fischer
50f5f3f97e [feature/elliptic-curve] Assign a variable to Math_BigInteger(1). 2013-06-07 00:43:40 +02:00
Andreas Fischer
a730ed6e4c [feature/elliptic-curve] Use an instance of Crypt_Hash instead of sha1(). 2013-06-07 00:38:38 +02:00
terrafrost
e25ae8c4f4 Merge pull request #114 from bantu/fix-weak-ssh-dh-keys
Fix weak ssh dh keys
2013-06-05 21:57:15 -07:00
Andreas Fischer
727dba5905 [remove-svn-version-lines] Remove useless @version: $Id$ lines.
These lines served some purpose on SVN, but are now useless on Git. They
actually do harm as they might make people think their files are older
than they actually are.
2013-06-02 18:50:46 +02:00
Andreas Fischer
1733c3366c [fix-weak-ssh-dh-keys] bitwise_leftShift() expects number of bits, not bytes. 2013-06-02 16:55:19 +02:00
Andreas Fischer
252c6ec68d [fix-weak-ssh-dh-keys] $keyLength is in bytes. Do not compare to 160 bits. 2013-06-02 16:54:02 +02:00
terrafrost
dc76cf5b8e SSH2: add $callable parameter to exec() 2013-05-28 17:02:27 -05:00
terrafrost
6fdac04fd1 SSH2: fix broken grammer from next to last commit
Thanks, bantu!
2013-05-14 17:15:23 -05:00
terrafrost
742fbc188f SSH2: return false (without error) on channel failure
Also update error message. SFTP, for example, makes a channel request even though it's not asking to open a pseudo-terminal.
2013-05-14 16:16:06 -05:00
terrafrost
40af708254 Merge pull request #106 from petrich/optimizations
Optimizations
2013-05-14 08:35:31 -07:00
terrafrost
1e2d0ccd9f SSH2: window size is server -> client, not client -> server 2013-05-13 22:37:32 -05:00
Hans-Jürgen Petrich
b242259d17 optimizations 2013-05-13 12:41:52 +07:00
terrafrost
06044e8632 SSH2: 0x7FFFFFFF == 2GB not 4GB 2013-05-10 16:48:10 -05:00
terrafrost
a48871a865 SSH2: realtime_file logging update 2013-05-10 17:45:57 -04:00
terrafrost
aa3e6c1a99 SSH2: rm last commit; _get_channel_packet() takes care of this lol 2013-05-08 15:13:18 -04:00
terrafrost
b440708a7b SSH2: check response in exec() 2013-05-08 11:44:34 -05:00
Hans-Jürgen Petrich
fe0cc95265 SSH2: Blowfish: typo... block_size adjustment
Changed: Blowfish block_size = 8
re: https://github.com/phpseclib/phpseclib/pull/100
2013-05-08 13:52:18 +07:00
terrafrost
e3a2772c30 SSH2: Add Crypt_Blowfish 2013-05-07 23:17:17 -05:00
Hans-Jürgen Petrich
a83166fe48 SSH2: Typo (Twofish related..)
Typo...
2013-05-05 08:59:44 +07:00
terrafrost
5dda3a088f SSH2: Twofish typos 2013-05-04 13:55:51 -05:00
terrafrost
2c43e9151c SSH2: add twofish support 2013-05-03 01:45:09 -05:00
terrafrost
3230a7b1f7 SSH2: Add getBannerMessage() function 2013-04-27 19:58:24 -05:00
terrafrost
8cecaf2d2b SSH2: another CS adjustment 2013-04-27 14:12:59 -05:00
terrafrost
04f5a28bff SSH2: CS adjustments 2013-04-27 14:10:36 -05:00
terrafrost
d6ee41d957 SSH2: fix E_NOTICE in keyboard interactive code
Thanks ravage84!
2013-04-24 01:07:32 -05:00
terrafrost
292340cdd5 SSH2: Improve timeout handling
(thanks, SergeyTsalkov!)
2013-04-20 20:43:05 -05:00
terrafrost
e0abab9bb4 SSH2: keyboard-interactive changes
Let's say your SSH server had a two-part keyboard-interactive auth. One prompt is for "Password" and the other is for "Verification code". Previously you'd have to do this:

$ssh->login($username, 'pass1', 'code1');

It'd try password authentication with pass1, fail, then do keyboard-interactive with pass1 and then keyboard-interacitve with code1.

ie. the order in which it tried stuff was dependent on the order it was past to the Net_SSH2 object.  And it'd always try password auth first.

Now you can go straight to keyboard-interactive and mix the order as follows:

$ssh->login($username, array('Password' => 'pass1'), array('Verification code' => 'code1'));
2013-04-20 14:35:08 -05:00
terrafrost
04c24f6bbc SSH2: More multi-factor authentication changes
Previously to do multi-factor authentication you'd have to do this:

$ssh->login($user, 'pass1');
$ssh->login($user, 'pass2');

Now you can do this too:

$ssh->login($user, 'pass1', 'pass2');
2013-04-20 14:33:07 -05:00
terrafrost
ccd4ce1d19 SSH2: add support for multi-factor authentication 2013-04-19 22:23:06 -05:00
David Stensland
28f18f83ec SSH2: Be less overly clever loading Crypt/Random 2013-04-01 12:29:28 -04:00
Brett Thomas
cc8e3cdbc1 added getStdError method to get stdErr, even when quiet mode enabled 2013-03-21 17:18:31 -05:00
terrafrost
0333805f5c SSH2: Add isConnected() function 2013-02-16 14:58:12 -06:00
Mike Kruk
d7e4678fc4 Use enablePTY() to get a PTY with exec() calls. While exec() is running
you can use read() and write() to interact with the shell.
2013-02-08 17:04:52 -05:00
terrafrost
248e3bb085 Undo last commit 2013-01-30 08:37:50 -06:00
terrafrost
bfb04dcf4d Add __construct() constructor to make namespace'ing easier for those wishing to do it 2013-01-29 22:09:31 -06:00
terrafrost
e7336e6b54 add size checking to binary packets in Net/SSH2.php (thanks ?????? ????????!) 2013-01-26 00:17:23 -06:00
Mike Kruk
efdec7b118 Extract the exit_status if given to us from SSH. 2013-01-17 13:47:42 -05:00
terrafrost
5d49af105f SSH2: $this->channel_buffers is an array - not a string 2013-01-13 11:36:57 -06:00
terrafrost
94ca5e1d0c SSH1,SSH2: strpos expects string - not array 2013-01-13 10:49:03 -06:00
terrafrost
bccce5802c SSH2: Use strlen instead of empty 2013-01-12 10:46:19 -06:00
terrafrost
bbed0916cd SSH2: Make $stop be after all network activity 2013-01-11 18:38:38 -06:00
terrafrost
e71fc97913 Revamp SSH1 logging and go back to using user_error
(_handle_error returned the line number in _handle_error - not the line number triggering the error)
2013-01-08 22:09:27 -06:00
terrafrost
35832fe2a1 Refactor crypt_random (renaming it to crypt_random_string)
...and update all the calls to it accordingly
2012-12-16 02:20:16 -06:00
terrafrost
3c6ae4312f The user_error in _handle_error shouldn't be replaced.. 2012-11-29 00:19:09 -06:00
terrafrost
3caaa91160 Replace user_error() with new _handle_error() function
To use exceptions do define('PHPSECLIB_USE_EXCEPTIONS', true).

To have the exceptions thrown by phpseclib be of a certain class define PHPSECLIB_EXCEPTION_CLASS.
2012-11-28 23:33:15 -06:00
terrafrost
dbc10491e7 Fix an E_NOTICE (thanks chubbypama!) 2012-11-28 08:17:57 -06:00
terrafrost
ff94576315 Remove unused fields from pack() 2012-11-27 14:38:30 -06:00
terrafrost
346bc5dcc8 Make it so none is a supported authentication method 2012-11-22 14:25:57 -06:00
terrafrost
875cef8bbd Revamp logging 2012-11-22 13:08:30 -06:00
terrafrost
6c33012a4a Suppress further error messages if connection is prematurely disconnected 2012-11-22 12:11:15 -06:00