/
githubmirror
/
curl
Обзор
Документация
Войти
/
githubmirror
/
curl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/data/test68
91 строка
2 KB
Daniel Stenberg
tests: convert base64 data to %b64[]
09 фев 2026, 10:42
Не верифицирован
09 фев 2026, 10:42
afe9fdd
Код
Авторство
О чём код?
<?xml version="1.0" encoding="US-ASCII"?> <testcase> <info> <keywords> HTTP HTTP GET HTTP NTLM auth NTLM </keywords> </info> # Server-side <reply> # This is supposed to be returned when the server gets a first # Authorization: NTLM line passed-in from the client <data1001 crlf="headers"> HTTP/1.1 401 Now gimme that second request of crap Server: Microsoft-IIS/5.0 Content-Length: 34 Content-Type: text/html; charset=iso-8859-1 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== This is not the real page either! </data1001> # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client <data1002 crlf="headers"> HTTP/1.1 401 You give me wrong password Server: Microsoft-IIS/5.0 WWW-Authenticate: NTLM Content-Length: 46 Content-Type: text/html; charset=iso-8859-1 Wrong password dude. Get it fixed and return. </data1002> <datacheck crlf="headers"> HTTP/1.1 401 Now gimme that second request of crap Server: Microsoft-IIS/5.0 Content-Length: 34 Content-Type: text/html; charset=iso-8859-1 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== HTTP/1.1 401 You give me wrong password Server: Microsoft-IIS/5.0 WWW-Authenticate: NTLM Content-Length: 46 Content-Type: text/html; charset=iso-8859-1 Wrong password dude. Get it fixed and return. </datacheck> </reply> # Client-side <client> <features> NTLM SSL !SSPI </features> <server> http </server> <name> HTTP with NTLM authorization and wrong password </name> <command> http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm </command> </client> # Verify data after the test has been "shot" <verify> <protocol crlf="headers"> GET /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT Authorization: NTLM %b64[NTLMSSP%00%01%00%00%00%06%82%08%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00]b64% User-Agent: curl/%VERSION Accept: */* GET /%TESTNUMBER HTTP/1.1 Host: %HOSTIP:%HTTPPORT Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= User-Agent: curl/%VERSION Accept: */* </protocol> </verify> </testcase>