Skip to content

Latest commit

 

History

History
188 lines (117 loc) · 5.16 KB

File metadata and controls

188 lines (117 loc) · 5.16 KB

NAME

LWP::Authen::Ntlm - LWP ��� (Microsoft) NTLM 茯�荐若�������鴻�˨�������í�ゃ����í�

SYNOPSIS

use LWP::UserAgent;
use HTTP::Request::Common;
my $url = 'http://www.company.com/protected_page.html';

# Set up the ntlm client and then the base64 encoded ntlm handshake message
my $ua = LWP::UserAgent->new(keep_alive=>1);
$ua->credentials('www.company.com:80', '', "MyDomain\\MyUserCode", 'MyPassword');

$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"}

DESCRIPTION

LWP::Authen::Ntlm ��壔��LWP ��с��Microsoft ��˨����c�☖����㋚����������� NTLM 茯�荐若�鴻�㏍�若�����篏帥�c�⓾�������泣�若����若��絲障����☀��荐若�с�������������˨����障����� �����勤��荐若�� Microsoft 筝㊤����勛��膵���勉�ゃ�潟����í����������с�壚����㋜����с�����

�����勉�≪�吾�ャ�若�˨�壔��Mark Bush ��˨����� Authen::NTLM ��≪�吾�ャ�若�˨�勐�ñ�鴻�� 篏帥�c�⓾����障����� CPAN ��˨�壔����������違�ŝ����ゃ�潟�帥�若����с�鴻�������ゃ�� Yee Man Chan ��˨����� Authen::NTLM ��≪�吾�ャ�若�˨����ñ���櫝�純�ŝ�勉�с�� 罩c����� NTLM ��≪�吾�ャ�若�˨��篏帥�c�⓾��������������腆肴��������綽�荀������������障�����

��������˨��Bush ��˨����� Authen::NTLM ���篏帥�c�⓾����� Mime::Base64 ��勉����若�吾�с�潟�˨����� ���篋������с�˨�������馹������������障����� 緇���c�⓾��Mime::Base64 ��� encode_base64 ��∽�違�� decode_base64 ��∽�違� �����壔�鴻����若�����絲上�������⓾��������������腆肴��������綽�荀������������障�����

USAGE

�����勉�≪�吾�ャ�若�˨�壔����ŝ����勉�潟�若����х�贋・篏帥����勉�с�壔�ŝ�����LWP �����������☁���・����� 篏帥�������障����� LWP ��激�鴻�������壔����泣�若�������� URL ���緇������������������������� NTLM 茯�荐若�鴻�㏍�若���� ��㊨�������������������勤��荐若��莎桁�������障����� NTLM 茯�荐若�����篏���������������˨��URL ���緇���������������������˨����ŝ����勉�潟�若���� ��������ゃ����勉��������荐㊤�������⓾�������ŝ�������違�ŝ����障�����:

  • 羂悟����� HTTP �・膓���������鴻�˨�����

    ���������茵������˨�壔��篁ヤ����勉�������˨��LWP::UserAgent ���篏������������ "keep_alive=>1" ��ŝ����激�с�潟��羝<����障��:

    my $ua = LWP::UserAgent->new(keep_alive=>1);
  • UserAgent ��ŝ����吾�с�壔����̬��荐惹����宴��荐㊤��������

    茯�荐惹����宴�壚札筝���勉�������ŝ����勉�с�ŝ�������違�ŝ����障�����:

    $ua->credentials('www.company.com:80', '', "MyDomain\\MyUserCode", 'MyPassword');

    茯�荐惹����宴��荐㊤����������勉�� HTTP::Request ��ŝ����吾�с�壔���� authorization_basic() ��<�純�������壚戎�����ŝ�����������羈���������⓾�������������� ��障�����'www.company.com:80' ��勰�������壩��絎���������������若�����絲障����☀��荐惹����宴�� 荐㊤��������������������紊ф��絖�絨����絖������阪�ャ�������������˨��羈���������⓾����������� (��������� LWP ��勉�潟�若����c�潟�井�号����˨����������勉�с��LWP::Authen::Ntlm �������� ��í����������������������障�����)���

AVAILABILITY

LWP ��̹�≪�����筝���㋜����ʃ蟹������ LWP ��<�若�ŝ�潟�違�ŝ�鴻����ц�������������鴻����с�����

LWP::Authen::Ntlm ��堺����勤蟹������ jtillman@bigfoot.com ��̬拶�����������障�����

COPYRIGHT

Copyright (c) 2002 James Tillman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

LWP, LWP::UserAgent, lwpcook.