Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: How to select NTLM authentication with LWP

by Khen1950fx (Canon)
on Oct 11, 2011 at 10:38 UTC ( #930781=note: print w/ replies, xml ) Need Help??


in reply to Re^4: How to select NTLM authentication with LWP
in thread How to select NTLM authentication with LWP

LWP::Authen::Ntlm has all the info you need. Note also that you do not have to specifically mention Authen::NTLM as that is automatically covered by LWP. As for credentials, I usually use localhost\\myusername followed by my personal password. myDomain\\user won't work:).


Comment on Re^5: How to select NTLM authentication with LWP
Select or Download Code
Re^6: How to select NTLM authentication with LWP
by tiedwu (Initiate) on Oct 12, 2011 at 08:18 UTC
    You said I should add ntlmv2(1), but the one problem is there is no function called ntlmv2 in Mark Bush's Authen::NTLM, so I am just confusing.

    By adding some codes to output debug message, the http headers receiving and sending like -

    Receiving Header

    DEBUG CHALLENGE=NTLM

    Sending Header

    DEBUG AUTH_VALUE=NTLM TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu

    Receiving Header

    DEBUG CHALLENGE=NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgoECPKv/RSekCEkAAAAAAAAAAI4AjgBIAAAABQLODgAAAA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIANQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMAUQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAAAAAA==

    Sending Header

    DEBUG AUTH_VALUE=NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAAAABgAAAABYKBAuQZ9M9LeG8EjqdivTY2s5nJtXiH67DptXptZiLTjwA5EcoOL/rTVRhRokq/SFJ4o3EAdQBhAG4AdABhAGMAbgA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA==

    Then falls into 401: Unauthorized.

    I am wondering the last header received from server was wrong or the last header which send to server was wrong.
Re^6: How to select NTLM authentication with LWP
by tiedwu (Initiate) on Oct 12, 2011 at 08:20 UTC
    You said I should add ntlmv2(1), but the one problem is there is no function called ntlmv2 in Mark Bush's Authen::NTLM, so I am just confusing.

    By adding some codes to output debug message, the http headers receiving and sending like -

    Receiving Header

    DEBUG: CHALLENGE=NTLM

    Sending Header

    DEBUG: AUTH_VALUE=NTLM TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu

    Receiving Header

    DEBUG: CHALLENGE=NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgoECPKv/RSekCEkAAAAAAAAAAI4AjgBIAAAABQLODgAAAA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIANQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMAUQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAAAAAA==

    Sending Header

    DEBUG: AUTH_VALUE=NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAAAABgAAAABYKBAuQZ9M9LeG8EjqdivTY2s5nJtXiH67DptXptZiLTjwA5EcoOL/rTVRhRokq/SFJ4o3EAdQBhAG4AdABhAGMAbgA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA==

    Then falls into 401: Unauthorized.

    I am wondering the last header received from server was wrong or the last header which send to server was wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://930781]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-07-14 02:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (254 votes), past polls