Commit Graph

75 Commits

Author SHA1 Message Date
terrafrost
60b66e3726 SFTP: Add chown and chgrp. 2013-02-17 18:23:35 -06:00
terrafrost
25c7e7bd96 SFTP: Add touch function
Also make it so chmod will auto-switch the filename / permissions if they're not in the "right" order (PHP's chmod and ftp_chmod order them differently from each other so this'll make phpseclib consistent with both)
2013-02-14 12:10:36 -06:00
terrafrost
faaa52774f SFTP: Add the ability to write to specific parts of files 2013-02-12 20:45:09 -06: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
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
885d7e0f24 SFTP: Make get() work correctly when files are being written to for partial transfers 2012-12-16 02:34:49 -06:00
terrafrost
a731220785 Fix E_NOTICE in SFTP.php (thanks dlgoodchild!) 2012-12-14 08:45:35 -06:00
terrafrost
65193d9a25 SFTP: Add $offset and $length get() function 2012-12-11 19:54:48 -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
6bc46d42e0 Only save the directory if it was able to be successfully created 2012-11-09 22:22:02 -06:00
terrafrost
9ead66143d Updates to mkdir() (thanks easy-dev!) 2012-11-07 23:35:23 -06:00
terrafrost
eba3fbe13e Suppress Warning messages
Warning messages would appear if recursive deletes or chmods were
attempted.  Also, doing pwd() when . was / would return //.
2012-10-13 19:42:01 -05:00
terrafrost
35d6910bf3 Revisions to _logError() function 2012-10-09 07:27:42 -05:00
terrafrost
827090c562 Update comments 2012-10-09 01:00:47 -05:00
terrafrost
c65f5ba0e5 Add SFTPv2 support
Thanks bitvise for providing an SFTP client that does SFTPv2 and to faceleg for bringing the issue to my attention!
2012-10-09 00:56:50 -05:00
terrafrost
c7d6492f43 stat() and lstat() ignore false output from _stat()
Thanks Fluffycloud!
2012-09-16 18:50:16 -05:00
Rob Loach
7e9a975296 Add Composer support to phpseclib 2012-06-08 15:38:27 -04:00
terrafrost
e484373a2b - updates to _remove directory (thanks, bantu) 2012-06-05 23:44:40 -05:00
Jim Wigginton
3141c0f803 - if the SFTP connection was closed prematurely put() could hang (thanks, KCC!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@221 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-14 01:43:49 +00:00
Jim Wigginton
1ab30836a6 - make it so requests can timeout (thanks pmprojx!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@195 21d32557-59b3-4da0-833f-c5933fad653e
2012-03-03 17:49:16 +00:00
Jim Wigginton
8ad76c9236 - get() no longer needs to know the size of a file to download it (thanks xyzzy!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@194 21d32557-59b3-4da0-833f-c5933fad653e
2012-01-20 06:36:16 +00:00
Jim Wigginton
883b13f540 - fclose() was being called twice (thanks zyzzy!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@193 21d32557-59b3-4da0-833f-c5933fad653e
2012-01-20 05:39:10 +00:00
Jim Wigginton
8e0845f411 - make it so size() doesn't give an E_NOTICE if the size attribute isn't present
- make delete() recursive by default
- fix a bug that prevented inbound packets from being logged

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@192 21d32557-59b3-4da0-833f-c5933fad653e
2012-01-20 05:33:19 +00:00
Jim Wigginton
0531f713ab - close local file if one is being used and if get() would return prematurely (thanks, Sascha.Pfalz!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@181 21d32557-59b3-4da0-833f-c5933fad653e
2011-10-14 05:46:18 +00:00
Jim Wigginton
58b4b8d681 - make realtime logging better accommodate whitespace
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@179 21d32557-59b3-4da0-833f-c5933fad653e
2011-09-17 18:46:04 +00:00
Jim Wigginton
7e416149c1 - NET_SFTP_APPEND -> NET_SFTP_RESUME
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@178 21d32557-59b3-4da0-833f-c5933fad653e
2011-09-10 05:46:19 +00:00
Jim Wigginton
023e0e0540 - make it so chmod can be done recursively
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@175 21d32557-59b3-4da0-833f-c5933fad653e
2011-08-03 19:03:56 +00:00
Jim Wigginton
285b7d511c - cache directories and make it so directories can be recursively deleted
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@174 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-31 07:23:21 +00:00
Jim Wigginton
68a5d7d4db - add real-time in-line logging capabilities to Net/SFTP.php (useful if you're dumping the output to a file or if you're trying to figure out why a script is timing out or something)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@173 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-23 15:53:23 +00:00
Jim Wigginton
d86bf78506 - add support for the sticky bit
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@170 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-06 05:43:48 +00:00
Jim Wigginton
bc5e07cd69 - updates to the upload resume functionality
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@169 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-04 20:42:05 +00:00
Jim Wigginton
8b352152dd - add the ability to resume sftp uploads
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@168 21d32557-59b3-4da0-833f-c5933fad653e
2011-07-04 00:46:00 +00:00
Jim Wigginton
38f1bd487f /home and /home/ should return the same thing for rawlist() and nlist() (thanks pioyu!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@167 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-25 15:06:43 +00:00
Jim Wigginton
3da6c0d608 /home and /home/ should return the same thing for rawlist() and nlist() (thanks pioyu!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@166 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-20 03:23:44 +00:00
Jim Wigginton
48494b64c8 - stat() should probably not say whether or not the target file is a symlink - presumably that's something only lstat() should do
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@163 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-01 04:24:16 +00:00
Jim Wigginton
893695d7f3 - stat() and lstat() now return information on the file type
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@162 21d32557-59b3-4da0-833f-c5933fad653e
2011-06-01 01:51:47 +00:00
Jim Wigginton
2b855b8869 - fix some E_NOTICEs and remove superfluous SFTP error log entries (thanks, Major Tom!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@161 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-30 21:24:16 +00:00
Jim Wigginton
bfacdf5cdf - fix E_NOTICEs (thanks, lordxor!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@155 21d32557-59b3-4da0-833f-c5933fad653e
2011-05-08 02:31:52 +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
0e40350db7 - syntax error
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@151 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-01 12:00:35 +00:00
Jim Wigginton
9660724387 - make get() return false if the SSH_FXP_READ packet failed
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@150 21d32557-59b3-4da0-833f-c5933fad653e
2011-03-31 10:49:33 +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
f6f9f3887d - extended attributes were not handled correctly (thanks scope_v24!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@146 21d32557-59b3-4da0-833f-c5933fad653e
2011-02-19 08:18:39 +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
029b61bc5e - parse the longname to get the file type (only currently works for Net_SFTP::rawlist())
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@140 21d32557-59b3-4da0-833f-c5933fad653e
2011-01-16 16:25:46 +00:00
Jim Wigginton
d5f788932c fix typo in comments
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@134 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-21 23:43:26 +00:00
Jim Wigginton
3d68aa3353 - add Net_SFTP::stat() and Net_SFTP::lstat() (thanks, TangiX!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@132 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-20 14:02:28 +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
3cb86474ae - fixed a bug in Net_SFTP::delete()
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@127 21d32557-59b3-4da0-833f-c5933fad653e
2010-10-24 05:32:30 +00:00