New SFTP plugin available now

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

sqa_wizard wrote:Well, I tried SFTP Plugin 0.97 beta and libssh2.dll 1.2.5 from 7.20.1 libcurl SSL.
=> copy of filenames with spaces still fails :(.
Yes, of course. :) It's like this:
Once upon a time, there was an old libssh2. It contained SCP functions, but it did nothing with received filenames. These were passed as argument to scp shell command. And as long as they did not contain any special character (space being the most common), it worked. But when space was present, it did not work, because shell commands don't like unquoted filenames with spaces. So ftpplug added a simple workaround. If filename contained space, quotes were added. Instead of space file.txt SCP functions received "space file.txt". And it worked fine with old libssh2. But then one day libssh2 developers fixed the bug in SCP functions by adding quoting of received filenames. For space file.txt it produces 'space file.txt' and shell commands are happy. But when it receives already quoted "space file.txt" from sftpplug, the end result is '"space file.txt"' and it means filename that actually contains those double quotes. And file with such name does not exist and SCP functions fail.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2Sob,

You crack me up! :lol:

Your fixed version works fine with spaces in filenames now. Hopefully, Mr. Ghilser will update the plugin soon, although I do agreed with him that "support for empty passwords" kindof makes the purpose of a sftp plugin pointless.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Is there a changelog of openssh somewhere? I would like to add this fix with a version check, so I add the quotes only for older openssh versions.
Author of Total Commander
https://www.ghisler.com
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2ghisler(Author),

I found this link if that helps at all.

http://mac.softpedia.com/progChangelog/OpenSSH-Changelog-14691.html
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

Quoting of SCP filenames was added in libssh2 version 1.1. Also it's the first version with libssh2_version() available.
But if you check libssh2_shell_quotearg() in src/scp.c, you'll see that it's much more then just spaces. So with other special characters it'll still fail. IMHO it'd be easier and better to just require newer library version. Or at least give some warning to user that his library is outdated.

2Boofo
Empty passwords support is already in libssh2, you can't turn it off. The user is automatically authenticated as soon as he gives the server his login name and asks for available authentication methods. There is no good reason to boycott it in sftpplug.
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2ghisler(Author)

Why not just include the DLLs that you know will work in the plugin file in the first post?
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
KucingLapar
Member
Member
Posts: 134
Joined: 2007-06-25, 11:54 UTC

Post by *KucingLapar »

Uh no support for moving files (Shift+F6) ?
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3869
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

2Sob: I finally could test your version ... works very well.
Thanks again for the work :)
#5767 Personal license
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3869
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Uh no support for moving files (Shift+F6) ?
Works fine here !

To move a file "test.txt" to the folder "MyFolder" just press Shift+F6 and enter "Myfolder/test.txt"
#5767 Personal license
KucingLapar
Member
Member
Posts: 134
Joined: 2007-06-25, 11:54 UTC

Post by *KucingLapar »

Try harder. Try with multiple files this time.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3869
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Shift+F6 works for a single file only and results in a "on sever move"

If you want to move multiple files, just open the same server on left and right panel simultaneously.

Now you can set your source and target folder accordingly and do your copy/move as usual ...
#5767 Personal license
iamwiesel
Junior Member
Junior Member
Posts: 2
Joined: 2010-05-13, 03:33 UTC

Post by *iamwiesel »

what i really wish is full ssh support. executing commands is already working, but the output is only shown at the 2-rows loglist at the top of the program and you have to double click it and scroll down to see the whole output.

also there is no chance to interrupt commands (Ctrl+C). when you do something like "tail -f test.log" to follow the output totalcmd hangs up complete.

would be very great if there would be a function to let popup a terminal window attached to the current session or to view the terminal in the filebrower.

and at least, what i want to say since years: totalcmd makes windows to a OS that is useful, very good job guys :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Where should the output be shown? TC is a file manager, not a terminal program. The main idea of sending commands is to handle small commands with files, e.g. setting permissions.

About the hang: Try holding down the Escape key.
Author of Total Commander
https://www.ghisler.com
iamwiesel
Junior Member
Junior Member
Posts: 2
Joined: 2010-05-13, 03:33 UTC

Post by *iamwiesel »

great, the hint with escape is working. how stupid i was that i didn't figure it out myself...

the log output could be shown in the same way the "quickview" (Ctrl-Q) function is working, the output only have to be auto scrolled down.

the other solution that is in my mind (and maybe the better one) is to popup a xterm window or something that is already attached with the ssh session. for example the bitwise tunnelier ssh client has such a function that is very useful.

would be really great if totalcmd could come into that advantage :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have just updated the plugin to version 0.98 beta. The patches from Sob have been added:
- empty password support
- SCP and spaces in names
- handle WSAAddressToStringA on Windows 2000
- fix for non-blocking connect()

Furthermore I'm now using "ls -la" when the user presses Alt+Enter and the "stat" command fails (e.g. because it's missing).

See the first message of this thread for the download links!
Author of Total Commander
https://www.ghisler.com
Post Reply