Andreas Fischer
563b8af6ce
Merge branch 'master' into php5
...
* master:
SSH2: rm redundant part of SSH2 unit test
SSH2: add unit test for getServerPublicHostKey
SSH2: make it so you can verify server public host key without logging on
2014-06-17 11:37:37 +02:00
terrafrost
5f56781261
SSH2: make it so you can verify server public host key without logging on
2014-06-16 10:19:34 -05:00
Andreas Fischer
67aedc240b
Change constructors from class name to __construct().
...
This has been produced as follows:
<?php
$replace = $files = [];
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1]));
foreach ($it as $fileinfo) {
if ($fileinfo->getExtension() === 'php') {
$file = $fileinfo->getPathname();
$content = file_get_contents($file);
$files[$file] = $content;
$tokens = token_get_all($content);
foreach ($tokens as $key => $value) {
if ($value[0] === T_CLASS) {
$class = $tokens[$key + 2][1];
$replace += array(
"$class::$class(" => "$class::__construct(",
"parent::$class(" => "parent::__construct(",
"function $class(" => "function __construct(",
);
}
}
}
}
foreach ($files as $file => $content) {
file_put_contents(
$file,
str_replace(
array_keys($replace),
array_values($replace),
$content
)
);
}
2014-06-16 17:06:34 +02:00
Andreas Fischer
14ba37c539
Merge branch 'master' into php5
...
* master:
SSH2: make $mac_algorithms non-static
2014-06-11 07:49:02 +02:00
terrafrost
246e9e154f
SSH2: make $mac_algorithms non-static
...
none of the other statically defined variables have the potential
to change as multiple Net_SSH2 objects are created but this one does.
ie. if you connect to one SSH-2.0-SSHD server then no subsequent server
will use hmac-sha1-96 even if it could
2014-06-10 23:08:56 -05:00
Andreas Fischer
f2f5fcd70a
Update users of Math_BigInteger.
2014-06-02 20:19:00 +02:00
Andreas Fischer
6f4a873cad
Merge branch 'master' into php5
...
* master:
Adjust documentation to coding guidelines: No () around include.
2014-06-02 12:51:24 +02:00
Andreas Fischer
e6f87318f5
Adjust documentation to coding guidelines: No () around include.
2014-06-01 23:28:49 +02:00
Andreas Fischer
712f820a26
Merge branch 'master' into php5
...
* master:
SSH2: 0x7FFFFFFF -> $this->window_size in one more place
SSH2: make it so callback functions can make exec() return early
2014-05-28 00:39:40 +02:00
terrafrost
db32efb276
SSH2: 0x7FFFFFFF -> $this->window_size in one more place
2014-05-26 17:57:14 -05:00
terrafrost
0dd929341b
SSH2: make it so callback functions can make exec() return early
2014-05-26 17:37:32 -05:00
Andreas Fischer
b3081f2a61
Merge branch 'master' into php5
...
* master:
SSH2: improve handling of incomplete packets
2014-04-19 15:46:56 +02:00
terrafrost
efd3b96dc8
SSH2: improve handling of incomplete packets
2014-04-18 16:58:00 -05:00
Andreas Fischer
a7da467819
Merge branch 'master' into php5
...
* master:
Added some simple Net_SSH2 tests
2014-04-18 16:55:42 +02:00
Andreas Fischer
b676cc2690
Merge pull request #241 from mpscholten/ssh2-tests
...
Added some simple Net_SSH2 tests
* mpscholten/ssh2-tests:
Added some simple Net_SSH2 tests
Conflicts:
tests/Net/SSH2Test.php
2014-04-18 16:54:24 +02:00
Andreas Fischer
58cdf692f8
Merge branch 'master' into php5
...
* master:
SSH2: move _connect() call to _login() from login()
SSH2: phpdoc updates
SSH: clarify role of constructor / connection timeout
SSH1: do fsockopen() call when login has been called
SSH2: != -> |=
SSH2: phpdoc changes
SSH2: syntax error
SSH2: timeout set in constructor != timeout set by setTimeout()
SSH2: add phpdoc header
SSH2: connect to server in login() function
Conflicts:
phpseclib/Net/SSH2.php
2014-04-10 18:00:38 +02:00
terrafrost
79719e8f74
SSH2: move _connect() call to _login() from login()
...
Per bantu, this is required for it to work with Net/SFTP.php
2014-04-08 08:48:12 -05:00
terrafrost
0ad0bb4c37
SSH2: phpdoc updates
2014-04-07 15:43:31 -05:00
terrafrost
677a291cb3
SSH: clarify role of constructor / connection timeout
...
Also, in Net_SSH2::_connect() $host is used in multiple places. Rather than changing all references to {$this->host}:{$this->port} preserve existing $host reference and update it accordingly
2014-04-07 10:26:46 -05:00
terrafrost
6fcfe5c885
SSH2: != -> |=
2014-04-07 00:25:38 -05:00
terrafrost
8f08301744
SSH2: phpdoc changes
2014-04-07 00:19:35 -05:00
terrafrost
ab341df973
SSH2: syntax error
2014-04-07 00:16:54 -05:00
terrafrost
f27a49299e
SSH2: timeout set in constructor != timeout set by setTimeout()
2014-04-07 00:02:03 -05:00
terrafrost
fc748346fc
SSH2: add phpdoc header
2014-04-06 23:56:21 -05:00
terrafrost
a14e71f38b
SSH2: connect to server in login() function
...
this change will make it so some parameters can be set after the
Net_SSH2 object has been created. eg. instead of doing
define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX) one can now do
$ssh->setLogging(...) or something.
2014-04-06 23:45:25 -05:00
Andreas Fischer
483b8a7d3c
Merge branch 'master' into php5
...
* master:
fix more ssh channel issues
2014-03-21 18:27:13 +01:00
terrafrost
7a2c7a414c
fix more ssh channel issues
...
In logs that were provided to me phpseclib sent a packet that was 2536 bytes long (excluding the bytes denoting the channel and data length) but the length packet said it was 32764 bytes long (ie. $max_size).
So when $max_size is less than the data being sent and has to be adjusted by a new window adjust message from the server and the adjustment makes $max_Size bigger than the data being sent over problems arise.
SSH's window size has caused issues before. Overall I don't think the SSH specs really explain the window size very well. I opened up an errata on SSH's RFC a while back about the issue.
2014-03-21 02:53:43 -05:00
Andreas Fischer
aecf89c031
Merge branch 'master' into php5
...
* master:
Drop meaningless, outdated, inconsistent version tags in doc blocks.
2014-03-13 00:03:38 +01:00
Andreas Fischer
fb1296bbec
Drop meaningless, outdated, inconsistent version tags in doc blocks.
...
find phpseclib -type f -name "*.php" -exec sed -i '/@version/d' {} \;
2014-03-11 15:58:33 +01:00
Andreas Fischer
cb56e676dc
Merge branch 'master' into php5
...
* master:
Tests for bug280.
Also replace this with call_user_func
Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not
2014-03-06 12:05:17 +01:00
Nicky Gerritsen
97d1e75a51
Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not
2014-03-05 15:44:17 +01:00
Andreas Fischer
88e6eef90f
Merge branch 'master' into php5
...
* master:
Add newline at EOF to phpseclib/System/SSH_Agent.php.
SSH_Agent: phpdoc updates
SSH_Agent: misc updates
SSH2: add ssh-agent support
2014-02-21 19:42:36 +01:00
terrafrost
e90648c7a5
SSH2: add ssh-agent support
2014-02-10 00:04:16 -06:00
Andreas Fischer
addd2ac320
Merge branch 'master' into php5
...
* master:
SSH2: ignore exit_status channel requests
2014-02-03 16:56:46 +01:00
terrafrost
cd9801db8a
SSH2: ignore exit_status channel requests
...
Fixes #258
2014-02-02 23:42:06 -06:00
Marc Philip Scholten
b7092ebc21
Added some simple Net_SSH2 tests
...
Placed helper at top again in my test
Removed a whitespace
2013-12-28 21:29:52 +01:00
terrafrost
05077cf0f3
Merge branch 'ssh2-identifier' into php5
2013-12-28 13:50:05 -06:00
terrafrost
268ec2e5d1
Merge branch 'ssh2-identifier'
2013-12-28 13:49:05 -06:00
terrafrost
0ccac2c998
SSH2: add new line in docblock comment
2013-12-28 13:47:24 -06:00
Marc Philip Scholten
19be15c4c4
Fixed typos
2013-12-28 18:16:09 +01:00
terrafrost
a1b749a0a0
Merge branch 'master' into php5
2013-12-27 10:25:19 -06:00
Marc Philip Scholten
ad0c7c52bd
Fixed cs
2013-12-26 21:02:18 +01:00
Marc Philip Scholten
b0de383f95
Replaced else { if ()...} with elseif() {}
2013-12-26 21:02:17 +01:00
Marc Philip Scholten
357d4253ee
Fixed typo
2013-12-26 21:00:58 +01:00
Marc Philip Scholten
4817d28a54
Refactored Net_SSH2::$identifier and added unit tests
...
Added return tag
2013-12-26 21:00:58 +01:00
Andreas Fischer
f63798b923
Merge pull request #233 from terrafrost/phar-fix
...
SSH2: better accomodate Phar's
* terrafrost/phar-fix:
SSH2: better accomodate Phar's
2013-12-26 19:43:26 +01:00
Andreas Fischer
0f69d35584
Fix indentation of _append_log in SSH1 and SSH2.
2013-12-26 11:45:24 +01:00
Andreas Fischer
0dd5a9ba9f
Merge pull request #228 from bantu/cs-whitespace
...
CS: Add useful whitespace CodeSniffer rules.
* bantu/cs-whitespace:
CS: Add useful whitespace CodeSniffer rules.
2013-12-26 11:38:17 +01:00
terrafrost
70b9a69c46
SSH2: better accomodate Phar's
2013-12-26 01:55:05 -06:00
Andreas Fischer
8bb80b3df0
CS: Add useful whitespace CodeSniffer rules.
2013-12-26 00:33:08 +01:00