Command line with password

Advertisement

k_zeon
Guest

Command line with password

Not sure if this is a bug or problem, but.
I have created a basic app to transfer 1 text file to a device. Part of bigger program.
It is all working well and have it so I get the stdIO from my app and display info
in a text box. I can see all current info in my app.

I have also added error checking ie, no file exists, no destination folder exists, wrong password for a device.

However, I have my password which is 11 characters. it authenticates and transfers the file
if I delete 3 characters from password and try again, it still works!
Also if I add other characters on the end it still works!

I also ran the WinSCP.exe program to test as well.
I enter my 11 digit password and as expected it works, however
if I now delete the last 3 characters and login, all works and WinSCP.exe opens up
ready to work.

If I delete the 4 characters from my 11 digit password, then it fails.

Is this a bug any difference in password should fail.

Pls advise.

P.S love the program and use it all the time, hence writing a program that I need
to SFTP a file.

Reply with quote

Advertisement

k_zeon
Guest

re Commandline and Password

Just to make it clear, my app uses WinSCP.com with commandline to transfer 1 file.
Password does not work as it should, as stated above

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: command line with password

Possibly you have pageant running with private key loaded, so that the password is not used at all.

It's difficult to provide any help without seeing a log file.

Reply with quote

Guest

Re: command line with password

Hi, thanks for replying.
Don't know what pageant is. In my VB6 app, I just shell a command line to transfer a file
"D:\Program Files\WinSCP\WinSCP.com /command ""option batch off"" ""option confirm off"" ""open sftp://" & User & ":" & Password & "@" & IPAddress & """ ""cd " & Chr(34) & CDFolder & Chr(34) & """  ""put " & Chr(34) & FiletoTransfer & Chr(34) & " " & Chr(34) & DestFolder & Chr(34) & """ ""Exit"""
If I alter the password on last 3 digits of 11 digit pass then transfer completes.
If I alter 4 then fails.

I also ran WinSCP.exe and have my details save without password. (previously have entered and ran).
I then doubleclick the entry in WinSCP.exe and it asks me for password, if I only alter 8 digits of my password then it opens up and shows me the directory. I can also add any other digits to the end of 8 digits and it still works.

Running on Windows 7, WinSCP 5.1.5.
Not a major problem as its just for my own use.
Thanks

Reply with quote

martin
Site Admin
martin avatar

Re: command line with password

Again, please attach a complete session log file for all scenarios (with description for each log).

Reply with quote

Advertisement

You can post new topics in this forum