File: ntlm2sess.htt

package info (click to toggle)
httest 2.4.23-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,876 kB
  • sloc: ansic: 19,553; sh: 10,550; xml: 1,047; makefile: 510; lisp: 145; perl: 31
file content (51 lines) | stat: -rw-r--r-- 1,029 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Test script/example for ntlm authentication
#

SET HOST=foo.bar
SET HOST_HDR=foo
SET PORT=80
SET USER=user
SET PASSWD=secret
SET URI=/

CLIENT

  _REQ $HOST $PORT
  __GET $URI HTTP/1.1
  __Host: $HOST_HDR
  __User-Agent: mozilla
  __
  _EXPECT . "WWW-Authenticate: NTLM"
  _WAIT
  _CLOSE

  _MATCH EXEC "(.*)" B64MSG
  _EXEC $TOP/src/htntlm --type=1 --write --flags="neg-oem neg-ntlm2-key req-target"

  _REQ $HOST $PORT
  __GET $URI HTTP/1.1
  __Host: $HOST_HDR
  __Authorization: NTLM $B64MSG
  __User-Agent: mozilla
  __
  _MATCH headers "WWW-Authenticate: NTLM (.*)" MSG2
  _WAIT

  _MATCH EXEC "\nchallenge: (.*)" CHL
  _EXEC $TOP/src/htntlm --read=$MSG2 --info

  _MATCH EXEC "(.*)" B64MSG
  _EXEC $TOP/src/htntlm --type=3 --write --challenge=$CHL --workstation=akira --domain=$DOMAIN --challenge=$CHL --user=$USER --password=$PASSWD --response="ntlm2-session"

  _REQ $HOST $PORT
  __GET $URI HTTP/1.1
  __Host: $HOST_HDR
  __Authorization: NTLM $B64MSG
  __User-Agent: mozilla
  __
  _EXPECT . "200 OK"
  _WAIT

END