Hi all,
I got some troubles using NTLM with Webinject :(. I took your updated
plugin Sven you gave there
http://groups.google.com/group/webinject/browse_thread/thread/c726d6c0af36343c
but couldn't make it works with me :s.
There are my conf. files and my logs :
config.xml:
<testcasefile>testcases.xml</testcasefile>
<useragent>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7)
Gecko/20100713 Firefox/3.6.7</useragent>
<break_on_errors>1</break_on_errors>
<httpauth>http://www.myurl.com:80::mylogin:mypassword</httpauth>
<max_redirect>5</max_redirect>
<globaltimeout>10</globaltimeout>
<globalhttplog>onfail</globalhttplog>
testcases.xml:
<testcases repeat="1">
<case
id="1"
description1="verify word 1"
method="get"
url="
http://www.myurl.com"
verifypositive="Documentation"
errormessage="Verif 1 erreur"
logrequest="yes"
logresponse="yes"
/>
<case
id="2"
description1="verify word 2"
method="get"
url="
http://www.myurl.com"
verifypositive="Packs"
errormessage="Verif 2 error"
logrequest="yes"
logresponse="yes"
/>
</testcases>
And finally the beginning of my http.log:
GET
http://www.myurl.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.9.2.7) Gecko/20100713 Firefox/3.6.7
HTTP/1.1 401 Unauthorized
Date: Wed, 18 Aug 2010 08:42:45 GMT
Server: Microsoft-IIS/7.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
Content-Length: 1293
Content-Type: text/html
Client-Date: Wed, 18 Aug 2010 08:41:57 GMT
Client-Peer: XX.XX.XX.XX:80
Client-Response-Num: 1
Client-Warning: Unsupported authentication scheme 'negotiate'
Title: 401 - Unauthorized: Access is denied due to invalid
credentials.
Nevertheless I tried some hacks given on webinject's previous forum
(Simon's url). I correctly installed Authen::NTLM but i can't make it
work. I also tried that script to see if my NTLM works :
#!/bin/bash
PROG=/usr/bin/curl
HOST="
http://www.myurl.com"
USER="myuser"
PASSWORD="mypass"
FILE=/tmp/check_http_ntlm
HALT=200
$PROG -s -S --ntlm -D $FILE -u $USER:$PASSWORD $HOST > /dev/null
STATUS=`grep -w 200 $FILE | awk '{ print $0 }'`
grep -q -w $HALT $FILE
if [ $? -eq 0 ]
then
echo "$STATUS|ntlm=0;1;0;0"
else echo "Unable to login!|ntlm=1;1;0;0"
exit 2
fi
And it works fine...
I certainly did some mistakes in my webinject conf files but i'm new
with it :s... Have someone an idea ?