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
f2f5fcd70a
Update users of Math_BigInteger.
2014-06-02 20:19:00 +02:00
Andreas Fischer
e6f87318f5
Adjust documentation to coding guidelines: No () around include.
2014-06-01 23:28:49 +02: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
24bb941799
SSH1: do fsockopen() call when login has been called
2014-04-07 00:30:50 -05: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
9c7c01c337
Merge pull request #223 from mpscholten/fix-ssh1-php55
...
Fix Net_SSH1 on Php5.5 (/e preg_replace modifier)
* mpscholten/fix-ssh1-php55:
Fixed classname of test
Fixed some wrong @see annotations
Fixed /e preg_replace modifier exactly like in 0dc8b27a6a
Added Net_SSH1::_format_log test
2013-12-26 18:41:25 +01:00
Marc Philip Scholten
6d8c02c432
Fixed some wrong @see annotations
2013-12-26 12:09:40 +01:00
Andreas Fischer
0f69d35584
Fix indentation of _append_log in SSH1 and SSH2.
2013-12-26 11:45:24 +01:00
Andreas Fischer
2da2f5d29f
Merge pull request #227 from bantu/ssh2-constant-prefix-ssh1
...
Use NET_SSH1_ instead of NET_SSH2_ prefix in SSH1.
* bantu/ssh2-constant-prefix-ssh1:
Use NET_SSH1_ instead of NET_SSH2_ prefix in SSH1.
2013-12-26 11:42:11 +01:00
Andreas Fischer
8bb80b3df0
CS: Add useful whitespace CodeSniffer rules.
2013-12-26 00:33:08 +01:00
Andreas Fischer
4290a5c216
Use NET_SSH1_ instead of NET_SSH2_ prefix in SSH1.
2013-12-26 00:26:36 +01:00
Marc Philip Scholten
ea8cadddad
Fixed /e preg_replace modifier exactly like in 0dc8b27a6a
2013-12-18 16:39:36 +01:00
Andreas Fischer
f0f029b2c1
CS: Fix "PEAR.Commenting.ClassComment.WrongTagOrder" sniff.
2013-12-11 18:33:18 +01:00
Andreas Fischer
3db1fbb072
CS: Fix "PEAR.Commenting.FileComment.TagIndent" sniff.
2013-12-10 20:10:37 +01:00
Andreas Fischer
6d1fb9f7db
CS: Fix "PEAR.Files.IncludingFile.UseIncludeOnce" sniff.
2013-12-06 01:03:34 +01:00
Andreas Fischer
bc6ff96292
Fix "PEAR.Files.IncludingFile.BracketsNotRequired" sniff.
2013-12-05 23:17:40 +01:00
Andreas Fischer
e09f1b730e
CodeSniffer: Fix PEAR.Classes.ClassDeclaration.OpenBraceNewLine sniff.
2013-12-03 19:34:41 +01:00
Andreas Fischer
ca9c8b107b
CodeSniffer: Fix Generic.PHP.LowerCaseConstant.Found sniff.
2013-12-03 18:54:43 +01:00
Marc Philip Scholten
3bfd884813
Removed vim comments
...
Reformated files
2013-11-23 19:42:26 +01: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
Hans-Jürgen Petrich
b242259d17
optimizations
2013-05-13 12:41:52 +07:00
Patrick Monnerat
90ff746ad1
Make all sources 7-bit ASCII.
2013-02-20 19:25:47 +01: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
94ca5e1d0c
SSH1,SSH2: strpos expects string - not array
2013-01-13 10:49:03 -06:00
terrafrost
b8768c8d11
SSH1: Make it so SSH packets spanning multiple TCP/IP packets can be rcvd
2013-01-12 10:45:35 -06:00
terrafrost
ab7f65d436
SSH1: Added setTimeout()
...
Note that interactiveRead() was left untouched.
2013-01-11 18:36:58 -06:00
terrafrost
d90caa17e3
SSH1: CS adjustments
2013-01-11 00:31:49 -06:00
terrafrost
46baf1815f
SSH1: Fix E_NOTICE
2013-01-10 00:42:53 -06:00
terrafrost
c3ee632587
SSH1: fix "Expected SSH_SMSG_SUCCESS" error
2013-01-09 23:56:33 -06:00
terrafrost
b1c96faf90
SSH1: Packets shown in log were encrypted
2013-01-09 22:54:11 -06:00
terrafrost
2ead31dac2
rm debug code
2013-01-09 00:07:54 -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
10d9671601
SSH1: Fix E_NOTICE (thanks nosx!)
2013-01-08 11:15:28 -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
8cf6bb0b1c
SSH1: Fix E_NOTICE (thanks dayton967!)
2012-11-14 04:34:33 -06:00
terrafrost
f0e1b2deec
- add second function_exists call to prevent require_once from being called if autoloader was called
2012-06-27 20:56:36 -05:00
terrafrost
5eacf2b05d
- do class_exists(Crypt_Random) too to facilitate auto-loading
2012-06-24 16:53:16 -05:00
terrafrost
6ee991f604
Merge branch 'master' of https://github.com/phpseclib/phpseclib
2012-06-20 10:43:20 -05:00
terrafrost
1e3778dc4f
- auto loading fixes (thanks skydiablo)
2012-06-20 10:36:36 -05:00
Andreas Fischer
5923f4ad68
[feature/consistent-file-endings] Remove remaining ?> from PHP files.
2012-06-11 10:33:39 +02:00
Rob Loach
7e9a975296
Add Composer support to phpseclib
2012-06-08 15:38:27 -04: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
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
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
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
f088d89712
- add logging to Net_SSH1 and fixed a bug in Crypt_DES (thanks, Suby!)
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@113 21d32557-59b3-4da0-833f-c5933fad653e
2010-08-08 05:06:38 +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
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
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
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
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
Jim Wigginton
01ddc53c6d
- update phpDoc comments for Net_SSH1::interactiveRead()
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@25 21d32557-59b3-4da0-833f-c5933fad653e
2009-03-09 22:00:17 +00:00
Jim Wigginton
01c841a0a0
- replaced "\t" with " "
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@17 21d32557-59b3-4da0-833f-c5933fad653e
2008-05-25 07:28:57 +00:00
Jim Wigginton
ad5bc5a1ef
- fix phpdoc comment for _disconnect function
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@14 21d32557-59b3-4da0-833f-c5933fad653e
2008-05-15 17:46:51 +00:00
Jim Wigginton
148178da63
*** empty log message ***
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@13 21d32557-59b3-4da0-833f-c5933fad653e
2008-05-15 17:40:03 +00:00
Jim Wigginton
81413b9da0
- added $timeout variable
...
- added destructor to Net_SSH2
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@12 21d32557-59b3-4da0-833f-c5933fad653e
2008-05-15 16:33:08 +00:00
Jim Wigginton
79944da3ed
- split off some of _get_binary_packet to _filter in SSH2.php
...
- updated URL to SSH-1 specs in SSH1.php
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@8 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-26 14:53:45 +00:00
Jim Wigginton
29ee82e67b
- updated URL
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@7 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-25 21:56:14 +00:00
Jim Wigginton
9a7150d61f
- added exec() to Net_SSH2
...
- renamed writeReadQuit() to exec() in Net_SSH1
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@6 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-25 21:49:33 +00:00
Jim Wigginton
8be1b1bb5c
- updated to use latest TripleDES.php
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@5 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-25 02:33:43 +00:00
Jim Wigginton
367ddebf80
- initial commit
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@3 21d32557-59b3-4da0-833f-c5933fad653e
2007-07-02 04:19:55 +00:00