• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP CONNECT
7HTTP proxy
8HTTP proxy NTLM auth
9NTLM
10</keywords>
11</info>
12
13# Server-side
14<reply>
15
16# this is returned first since we get no proxy-auth
17<connect1001>
18HTTP/1.0 407 Authorization Required to proxy me my dear
19Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
20Connection: Keep-Alive
21Content-Length: 1033
22
23And you should ignore this data.
24QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
25</connect1001>
26
27# This is supposed to be returned when the server gets the second
28# Authorization: NTLM line passed-in from the client
29<connect1002>
30HTTP/1.1 200 Things are fine in proxy land
31Server: Microsoft-IIS/5.0
32Content-Type: text/html; charset=iso-8859-1
33
34</connect1002>
35
36# this is returned when we get a GET!
37<data2>
38HTTP/1.1 200 OK
39Date: Tue, 09 Nov 2010 14:49:00 GMT
40Content-Length: 7
41Connection: close
42Content-Type: text/html
43Funny-head: yesyes
44
45daniel
46</data2>
47
48# then this is returned when we get proxy-auth
49<data1000>
50HTTP/1.1 200 OK swsbounce
51Server: no
52
53Nice proxy auth sir!
54</data1000>
55
56<datacheck>
57HTTP/1.0 407 Authorization Required to proxy me my dear
58Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
59Connection: Keep-Alive
60Content-Length: 1033
61
62HTTP/1.1 200 Things are fine in proxy land
63Server: Microsoft-IIS/5.0
64Content-Type: text/html; charset=iso-8859-1
65
66HTTP/1.1 200 OK
67Date: Tue, 09 Nov 2010 14:49:00 GMT
68Content-Length: 7
69Connection: close
70Content-Type: text/html
71Funny-head: yesyes
72
73daniel
74</datacheck>
75</reply>
76
77# Client-side
78<client>
79<server>
80http
81</server>
82<features>
83NTLM
84SSL
85!SSPI
86proxy
87</features>
88<name>
89HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
90</name>
91<command>
92http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
93</command>
94</client>
95
96# Verify data after the test has been "shot"
97<verify>
98<protocol nonewline="yes">
99CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
100Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
101Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
102User-Agent: curl/%VERSION
103Proxy-Connection: Keep-Alive
104
105CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
106Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
107Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
108User-Agent: curl/%VERSION
109Proxy-Connection: Keep-Alive
110
111POST /path/%TESTNUMBER0002 HTTP/1.1
112Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
113User-Agent: curl/%VERSION
114Accept: */*
115Content-Length: 6
116Content-Type: application/x-www-form-urlencoded
117
118postit
119</protocol>
120</verify>
121</testcase>
122