Proxy | Libro arquitectura | Property in Spain | Bleach | Bad Credit Loan
Perl question [Archive] - ZGeek

PDA

View Full Version : Perl question


jasebert
08-08-2005, 12:29 PM
Hello people,

Before I ask this question, I have say I know nothing of programming or scripting (except for batch files, and does that really count) so if this is a dumb ass question, or if it is in the wrong forum, I apologise.

My question is....

Can I use a perl script to authenticate through a Microsoft ISA server that is working as a proxy using integrated authentication.
I have tried below but it is not working.
$ua->proxy('http','http://server:8080');
$ua->credentials('server:80', '', "DOMAIN\\userid",'password');

The basis of this script is to obtain information which it will then download to a computer. The rest of the script works, but I need to get it to authenticate through a proxy.
Any assistance would be great.

t101
08-08-2005, 12:38 PM
Hello people,

Before I ask this question, I have say I know nothing of programming or scripting (except for batch files, and does that really count) so if this is a dumb ass question, or if it is in the wrong forum, I apologise.

My question is....

Can I use a perl script to authenticate through a Microsoft ISA server that is working as a proxy using integrated authentication.
I have tried below but it is not working.
$ua->proxy('http','http://server:8080');
$ua->credentials('server:80', '', "DOMAIN\\userid",'password');

The basis of this script is to obtain information which it will then download to a computer. The rest of the script works, but I need to get it to authenticate through a proxy.
Any assistance would be great.
Are you using LWP::UserAgent or WWW::Mechanize?

t101
08-08-2005, 12:47 PM
Actually, I asked the wrong question...

Are you trying to authenticate to a proxy so you can access stuff past it or are you trying to authenticate to a website?

If it's a proxy, you have to change your proxy call to something like:

$ua->proxy('http', 'http://username:password@server:8080');

Note that if your username or password have :'s or @'s in them you may need to encode those characters in the username and password - : is %3a and @ is %40.

The credentials method is used when you have to authenticate to a website, not a proxy. I find this function to be a little unstable - I prefer overriding the get_basic_credentials method instead in a specialised package.

jasebert
08-08-2005, 02:19 PM
I am trying to authenticate to a proxy on a windows 2000 active directory domain.
The proxy server uses integrated authentication.
I will try what you have suggested. Cheers.

jasebert
11-08-2005, 10:19 AM
That did not work. It errored out saying
No responce from web site: 502 Proxy Error (The ISA Server denies the specified URL).
I will have more of a look in the ISA server as to why it gave me back that error, but if you could think of anything in the meantime, that would be fantastic.