ntlm auth

2004-10-15 Thread Ing. Branislav Gerzo
Hi all,

I changed my work, I'm behind MS proxy, I need authenticate on our
proxy (NTLM). But I can't get it to work:

use LWP::Debug qw(+);
use LWP::UserAgent;
use HTTP::Request::Common;
my $url = 'http://www.google.com';

# Set up the ntlm client and then the base64 encoded ntlm handshake message
my $ua = new LWP::UserAgent(keep_alive=>1);
my $proxy = '10.1.1.3:8080';
my $user = 'xxx';
my $pass = 'yyy';
$ua->credentials($proxy, '', $user, $pass);
$ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; iOpus-I-M; .NET CLR 
1.1.4322)');

$request = GET $url;
print "--Performing request now...---\n";
$response = $ua->request($request);
print "--Done with request---\n";

if ($response->is_success) {print "It worked!->" . $response->code . "\n"}
else {print "It didn't work!->" . $response->code . "\n"}

=
I always get:

LWP::UserAgent::new: ()
--Performing request now...---
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://www.google.com
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::UserAgent::request: Simple response: Internal Server Error
--Done with request---
It didn't work!->500

=

I am on the intranet with no domain, I am in workgroup "MDI"
Any help on this ?

Thanks.


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




Re: ntlm auth

2004-10-15 Thread Ing. Branislav Gerzo
Ing. Branislav Gerzo [IBG], on Friday, October 15, 2004 at 10:45
(+0200) typed:

IBG> I changed my work, I'm behind MS proxy, I need authenticate on our
IBG> proxy (NTLM). But I can't get it to work:

I tried 'NTLM Authorization Proxy Server' v.0.9.7.
( http://www.geocities.com/rozmanov/ntlm/ )
it works great with Opera browser, and also with my perl scripts, I
just set proxy like this:

$ua->proxy(http  => 'http://localhost:5865');

and everything is fine. :)

-- 

 ...m8s, cu l8r, Brano.

[Liberal Tactic #9: If you can't refute the message, attac]



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