--- Buffy Press <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am very new to Perl and I have a question for the list.
> 
> I have a script that collects URL's from a web site.   This web site
> requires a name and password to access it.  When I run the script using
> Perl -w I get this message:
> 
> HTTP: Access authorization required.
>        Use the -auth=id:pw parameter.
> 
> I have looked in my Programming Perl book and other online Perl
> resources and I cannot find any information on -auth.
> 
> Does anyone know the syntax of the above command or is there a better
> way to send a user id and password to the host?
> 
> Thanks.
> -- 
> Buffy Payne Press 
> mailto:[EMAIL PROTECTED]
> http://www.mfm.com

Buffy,

It's not terribly well-known, but there is an alternative method of using Basic 
Authentication. 
Let's say your username is "Ovid" and your password is "Naso" and the URL that you 
need to send
your authentication information to is http://www.someserver.com/cgi-bin/ascript.cgi.  
You should
be able to authenticate with the following syntax:

    http://Ovid:[EMAIL PROTECTED]/cgi-bin/ascript.cgi

Essentially, you add your URI escaped username and password, separated by a colon and 
followed by
an at '@' sign, immediately after the protocol.

It should also be noted that Basic Authentication, by itself, is terribly insecure.  
It encodes
your credentials with Base64 encoding, which is a one-for-one character substitution.  
This is why
it is often said that Basic Authentication sends this information as plain text.  
Hopefully, the
actual site that you want to authenticate to uses https.

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to