wget --help
...
HTTP options:
       --http-user=USER        set http user to USER.
       --http-passwd=PASS      set http password to PASS.

for a starter.
Take another look at the documentation here are some other tidbits you'll
find important, straight from the docs :
<start excerpts>
Important Note: if you specify a password-containing URL on the command
line, the username and password will be plainly visible to all users on the
system, by way of ps. On multi-user systems, this is a big security risk. To
work around it, use wget -i - and feed the URLs to Wget's standard input,
each on a separate line, terminated by C-d. 
You can encode unsafe characters in a URL as %xy, xy being the hexadecimal
representation of the character's ASCII value. Some common unsafe characters
include % (quoted as %25), : (quoted as %3A), and @ (quoted as %40). Refer
to RFC1738 for a comprehensive list of unsafe characters. 

--http-user=user 
--http-passwd=password 
Specify the username user and password password on an HTTP server. According
to the type of the challenge, Wget will encode them using either the basic
(insecure) or the digest authentication scheme. 
Another way to specify username and password is in the URL itself (see URL
Format.). Either method reveals your password to anyone who bothers to run
ps. To prevent the passwords from being seen, store them in .wgetrc or
.netrc, and make sure to protect those files from other users with chmod. If
the passwords are really important, do not leave them lying in those files
either--edit the files and delete them after Wget has started the download. 

--proxy-user=user 
--proxy-passwd=password 
Specify the username user and password password for authentication on a
proxy server. Wget will encode them using the basic authentication scheme. 
Security considerations similar to those with --http-passwd pertain here as
well. 

(wgetrc commands)
proxy_user = string 
Set proxy authentication user name to string, like --proxy-user. 
proxy_passwd = string 
Set proxy authentication password to string, like --proxy-passwd.

(the entire PROXY section, ommissed)

Security Considerations

When using Wget, you must be aware that it sends unencrypted passwords
through the network, which may present a security problem. Here are the main
issues, and some solutions. 

The passwords on the command line are visible using ps. The best way around
it is to use wget -i - and feed the URLs to Wget's standard input, each on a
separate line, terminated by C-d. Another workaround is to use .netrc to
store passwords; however, storing unencrypted passwords is also considered a
security risk. 
Using the insecure basic authentication scheme, unencrypted passwords are
transmitted through the network routers and gateways. 
The FTP passwords are also in no way encrypted. There is no good solution
for this at the moment. 
Although the "normal" output of Wget tries to hide the passwords, debugging
logs show them, in all forms. This problem is avoided by being careful when
you send debug logs (yes, even when you send them to me). 
<end excerpts>

Heiko

--
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED] [EMAIL PROTECTED]
-- +39-041-5907073 ph
-- +39-041-5907472 fax 
-----Original Message-----
From: Mathias Wittwer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 17, 2004 11:32 PM
To: [EMAIL PROTECTED]
Subject: http authentication


hi,

i would like to download a page, which is protected by username and
password.

the start page is something like http://www.zzz.ch/username.asp there 2
input fields for username and password. if the input is correct, i get
forwarded to something like http://www.zzz.ch/usage.cgi. thats the page i
would like to have locally for further processing.

as i am a newby, i am not sure how and where to start and the wget
documentation did not really make sense to me so far.

is there any way to get wget to do that or am i on the wrong track?

Thanks for your respond!

matt

Reply via email to