Using curl to test authentication methods through web proxy (basic, ntlm, kerberos)
Vložil/a cm3l1k1, 19 Září, 2012 - 16:18
This is just quick note because I'm re-discovering it every time when needed :]
# Using Basic authentication
curl -vvv --proxy-basic --proxy-user 'DOMAIN\user' http://www.security-portal.cz
# Using Digest authentication
curl -vvv --proxy-digest --proxy-user 'DOMAIN\user' http://www.security-portal.cz
# Using NTLM
curl -vvv --proxy-ntlm --proxy-user 'DOMAIN\user' http://www.security-portal.cz
# If you use an SSPI-enabled curl binary your username can be picked up from environment
curl -vvv --proxy-ntlm --proxy-user : http://www.security-portal.cz
# Kerberos authentication
curl -vvv --proxy-negotiate --proxy-user 'DOMAIN\user' http://www.security-portal.cz
curl -vvv --proxy-basic --proxy-user 'DOMAIN\user' http://www.security-portal.cz
# Using Digest authentication
curl -vvv --proxy-digest --proxy-user 'DOMAIN\user' http://www.security-portal.cz
# Using NTLM
curl -vvv --proxy-ntlm --proxy-user 'DOMAIN\user' http://www.security-portal.cz
# If you use an SSPI-enabled curl binary your username can be picked up from environment
curl -vvv --proxy-ntlm --proxy-user : http://www.security-portal.cz
# Kerberos authentication
curl -vvv --proxy-negotiate --proxy-user 'DOMAIN\user' http://www.security-portal.cz
If backend server needs authentication, option --user
has to be used
curl -vvv --user 'DOMAIN\user:password' http://www.security-portal.cz
To use different proxy instead of $http_proxy variable, use --proxy $proxyname:$port
EOF
- Blog uživatele cm3l1k1
- Pro psaní komentářů se přihlašte