test548 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. NTLM
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 407 Authorization Required swsclose
  15. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  16. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  17. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  18. Proxy-Authenticate: NTLM
  19. Content-Type: text/html; charset=iso-8859-1
  20. Connection: close
  21. This is not the real page
  22. </data>
  23. # this is returned first since we get no proxy-auth
  24. <data1001>
  25. HTTP/1.1 407 Authorization Required to proxy me my dear
  26. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  27. Content-Length: 34
  28. Hey you, authenticate or go away!
  29. </data1001>
  30. # This is supposed to be returned when the server gets the second
  31. # Authorization: NTLM line passed-in from the client
  32. <data1002>
  33. HTTP/1.1 200 Things are fine in proxy land swsclose
  34. Server: Microsoft-IIS/5.0
  35. Content-Type: text/html; charset=iso-8859-1
  36. Content-Length: 42
  37. Contents of that page you requested, sir.
  38. </data1002>
  39. <datacheck>
  40. HTTP/1.1 407 Authorization Required swsclose
  41. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  42. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  43. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  44. Proxy-Authenticate: NTLM
  45. Content-Type: text/html; charset=iso-8859-1
  46. Connection: close
  47. HTTP/1.1 407 Authorization Required to proxy me my dear
  48. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  49. Content-Length: 34
  50. HTTP/1.1 200 Things are fine in proxy land swsclose
  51. Server: Microsoft-IIS/5.0
  52. Content-Type: text/html; charset=iso-8859-1
  53. Content-Length: 42
  54. Contents of that page you requested, sir.
  55. </datacheck>
  56. </reply>
  57. # Client-side
  58. <client>
  59. <server>
  60. http
  61. </server>
  62. # tool to use
  63. <tool>
  64. lib%TESTNUMBER
  65. </tool>
  66. <features>
  67. NTLM
  68. SSL
  69. !SSPI
  70. proxy
  71. </features>
  72. <name>
  73. HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS
  74. </name>
  75. <command>
  76. http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass
  77. </command>
  78. </client>
  79. # Verify data after the test has been "shot"
  80. <verify>
  81. <protocol>
  82. POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
  83. Host: test.remote.example.com
  84. Accept: */*
  85. Proxy-Connection: Keep-Alive
  86. Content-Length: 36
  87. Content-Type: application/x-www-form-urlencoded
  88. this is the blurb we want to upload
  89. POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
  90. Host: test.remote.example.com
  91. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  92. Accept: */*
  93. Proxy-Connection: Keep-Alive
  94. Content-Length: 0
  95. Content-Type: application/x-www-form-urlencoded
  96. POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
  97. Host: test.remote.example.com
  98. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
  99. Accept: */*
  100. Proxy-Connection: Keep-Alive
  101. Content-Length: 36
  102. Content-Type: application/x-www-form-urlencoded
  103. this is the blurb we want to upload
  104. </protocol>
  105. </verify>
  106. </testcase>