rejetto forum

How I use browse command line login HFS & upload or download files?

mis · 3 · 3477

0 Members and 1 Guest are viewing this topic.

Offline mis

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
HI,
How I use browse command line login HFS & upload or download files?
example:
win10 + cmd windows
"c:\program files\mozilla firefox\firefox" 192.168.0.103:8011\~login

I can call login page. But I can't pass user account and password to login page.

example:
win10 + cmd windows
"c:\program files\mozilla firefox\firefox" 192.168.0.103:8011\~login@user:password

It's not work. Does hfs support such a login method?



Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
HI,
How I use browse command line login HFS & upload or download files?
example:
win10 + cmd windows
"c:\program files\mozilla firefox\firefox" 192.168.0.103:8011\~login

I can call login page. But I can't pass user account and password to login page.

example:
win10 + cmd windows
"c:\program files\mozilla firefox\firefox" 192.168.0.103:8011\~login@user:password

It's not work. Does hfs support such a login method?
Hi, welcome... :)

To make use of "HTTP Basic Auth" (the authentication method that HFS uses) from command line, you could simply use (only if you need to download, but not upload files):

Code: [Select]
"C:\Program Files\Mozilla Firefox\firefox.exe" -url "http://user:pass@127.0.0.1:80/protected-folder/protected-file.jpg"
But if you need to upload a file (in a password protected folder) this is much more complex (and it will not work from command line by simply using Firefox). In that case you would need to do the "HTTP Basic Auth" using cURL or Wget. Search the forum and you will find working examples. ;)

Cheers,
Leo.-

PS: Mmmm, a lot of new users asking questions lately, good... ??? ;D
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline mis

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
hi, Thank you for your guidance and information.

I have successfully completed.
Yes, next I need to study how to upload using curl.
Thank you very much for your teaching.

Thanks again for your assistance.