HTTP / Autodiscover
Testa headers, omdirigeringar och Autodiscover.
HTTP-headers
Hämtar bara svarshuvudena för en URL, utan att ladda innehållet.
Webmail
PowerShell (Windows)
Invoke-WebRequest Inbyggt
(Invoke-WebRequest -Method Head -Uri "https://webmail.example.com" -UseBasicParsing).Headers curl Inbyggt
curl.exe -sSI "https://webmail.example.com" Unix-skal (bash)
curl Inbyggt
curl -sSI "https://webmail.example.com" wget Tilläggsverktyg
wget -S --spider "https://webmail.example.com" Autodiscover
PowerShell (Windows)
Invoke-WebRequest Inbyggt
(Invoke-WebRequest -Method Head -Uri "https://autodiscover.example.com/autodiscover/autodiscover.xml" -UseBasicParsing).Headers curl Inbyggt
curl.exe -sSI "https://autodiscover.example.com/autodiscover/autodiscover.xml" Unix-skal (bash)
curl Inbyggt
curl -sSI "https://autodiscover.example.com/autodiscover/autodiscover.xml" wget Tilläggsverktyg
wget -S --spider "https://autodiscover.example.com/autodiscover/autodiscover.xml" Följ omdirigeringar
Följer en URL:s omdirigeringskedja steg för steg.
PowerShell (Windows)
Invoke-WebRequest Inbyggt
$u = "https://mail.example.com"
do {
$r = Invoke-WebRequest -Uri $u -Method Head -MaximumRedirection 0 -SkipHttpErrorCheck -UseBasicParsing
"{0} -> {1}" -f [int]$r.StatusCode, $r.Headers.Location
$u = $r.Headers.Location
} while ($u) curl Inbyggt
curl.exe -sSIL "https://mail.example.com" Unix-skal (bash)
curl Inbyggt
curl -sSIL "https://mail.example.com" | grep -Ei "^(HTTP/|location:)" wget Tilläggsverktyg
wget --max-redirect=10 -S --spider "https://mail.example.com" 2>&1 | grep -Ei "HTTP/|Location:" -SkipHttpErrorCheck kräver PowerShell 7 eller senare.
Testa Autodiscover
Skickar en Autodiscover-förfrågan till autodiscover.<domain> (Exchange / Microsoft 365).
- E-postadress
-
user@example.comÄndra i generatorn →
PowerShell (Windows)
Invoke-RestMethod Inbyggt
$body = @'
<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
<Request>
<EMailAddress>user@example.com</EMailAddress>
<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
</Request>
</Autodiscover>
'@
Invoke-RestMethod -Method Post -ContentType "text/xml" -Credential (Get-Credential user@example.com) `
-Uri "https://autodiscover.example.com/autodiscover/autodiscover.xml" -Body $body curl Inbyggt
curl.exe -sS -u user@example.com -H "Content-Type: text/xml" -d "@ad.xml" "https://autodiscover.example.com/autodiscover/autodiscover.xml" Unix-skal (bash)
curl Inbyggt
cat > ad.xml <<'EOF'
<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
<Request>
<EMailAddress>user@example.com</EMailAddress>
<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
</Request>
</Autodiscover>
EOF
curl -sS -u user@example.com -H "Content-Type: text/xml" \
-d @ad.xml "https://autodiscover.example.com/autodiscover/autodiscover.xml" wget Tilläggsverktyg
wget -qO- --post-file=ad.xml --header="Content-Type: text/xml" --user=user@example.com --ask-password "https://autodiscover.example.com/autodiscover/autodiscover.xml" Get-Credential frågar efter lösenordet på ett säkert sätt. Basic-autentisering måste vara tillåten hos målet.