Benutzer-Werkzeuge

Webseiten-Werkzeuge


start

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
start [2026/02/18 23:11]
jango
start [2026/02/19 22:31] (aktuell)
jango
Zeile 1: Zeile 1:
 <code> <code>
-[22:55:17.197# 33 -> HTTP -1 (ms) +param( 
-[22:55:17.407] # 34 -> HTTP -1 (ms) +  [string]$Url = "https://mail.deinedomain.tld/owa/", 
-[22:55:17.611] # 35 -> HTTP -1 (ms) +  [string]$Username = "DOMAIN\user", 
-[22:55:17.825] # 36 -> HTTP -1 (ms) +  [string]$Password = "secret", 
-[22:55:18.042] # 37 -> HTTP -1 (ms) +  [switch]$IgnoreCertErrors 
-[22:55:18.245] # 38 -> HTTP -1 (ms) +
-[22:55:18.456] # 39 -> HTTP -1 (ms) + 
-[22:55:18.669] # 40 -> HTTP -1 (ms) +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 
-[22:55:18.876] # 41 -> HTTP -1 (ms) +if ($IgnoreCertErrors) { [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true } } 
-[22:55:19.086] # 42 -> HTTP -1 (ms) + 
-[22:55:19.286] # 43 -> HTTP -1 (ms) +function New-BasicAuthValue([string]$User,[string]$Pass){ 
-[22:55:19.496] # 44 -> HTTP -1 (ms) +  $pair = "{0}:{1}" -f $User,$Pass 
-[22:55:19.701] # 45 -> HTTP -1 (ms) +  "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($pair)) 
-[22:55:19.910] # 46 -> HTTP -1 (ms) +
-[22:55:20.120] # 47 -> HTTP -1 (ms) + 
-[22:55:20.321] # 48 -> HTTP -1 (ms) +$req = [System.Net.HttpWebRequest]::Create($Url) 
-[22:55:20.531] # 49 -> HTTP -(ms) +$req.Method = "GET" 
-[22:55:20.749] # 50 -> HTTP -(ms)+$req.AllowAutoRedirect = $false 
 +$req.Headers.Add("Authorization", (New-BasicAuthValue $Username $Password)) 
 +$req.UserAgent = "OWA-BasicTest/PS5.1" 
 + 
 +try { $resp = $req.GetResponse() } 
 +catch [System.Net.WebException] { $resp = $_.Exception.Response } 
 + 
 +if ($resp) { 
 +  "HTTP: {0}" -f ([int]$resp.StatusCode) 
 +  "Location: {0}" -f $resp.Headers["Location"
 +  "WWW-Authenticate: {0}" -f ($resp.Headers.GetValues("WWW-Authenticate") -join " | ") 
 +  $resp.Close() 
 +
 +</code> 
 + 
 +<code> 
 +param( 
 +  [string]$Url = "https://mail.deinedomain.tld/owa/", 
 +  [switch]$IgnoreCertErrors 
 +
 + 
 +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 
 +if ($IgnoreCertErrors) { [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true } } 
 + 
 +$req = [System.Net.HttpWebRequest]::Create($Url) 
 +$req.Method = "GET" 
 +$req.AllowAutoRedirect = $false 
 + 
 +try { 
 +  $resp = $req.GetResponse() 
 +} catch [System.Net.WebException] { 
 +  $resp = $_.Exception.Response 
 +
 + 
 +if ($resp) { 
 +  "HTTP: {0}" -f ([int]$resp.StatusCode) 
 +  "WWW-Authenticate:" 
 +  $resp.Headers.GetValues("WWW-Authenticate"
 +  $resp.Close() 
 +} else { 
 +  "No response (TLS/DNS/Network issue)." 
 +
 +</code> 
 + 
 +<code> 
 +PS C:\Users\Manuel Zarat> C:\Users\Manuel Zarat\Desktop\eas.ps1 
 +Target: https://eas.akm.at/Microsoft-Server-ActiveSync 
 +User:   D2000\\jango.zarat 
 +Count:  20  Delay: 100ms  Timeout: 10s 
 + 
 +[13:46:23.900] #   -> HTTP 401 (1156 ms) 
 +[13:46:25.197] #   2 -> HTTP 401 (1187 ms) 
 +[13:46:26.485] #   3 -> HTTP 401 (1181 ms) 
 +[13:46:27.753] #   4 -> HTTP 401 (1159 ms) 
 +[13:46:29.014] #   5 -> HTTP 401 (1147 ms) 
 +[13:46:30.271] #   6 -> HTTP 401 (1151 ms) 
 +[13:46:31.550] #   7 -> HTTP 401 (1161 ms) 
 +[13:46:32.821] #   8 -> HTTP 401 (1167 ms) 
 +[13:46:34.072] #   9 -> HTTP 401 (1141 ms) 
 +[13:46:35.328] #  10 -> HTTP 401 (1153 ms) 
 +[13:46:36.606] #  11 -> HTTP 401 (1168 ms) 
 +[13:46:37.876] #  12 -> HTTP 401 (1175 ms) 
 +[13:46:39.153] #  13 -> HTTP 401 (1151 ms) 
 +[13:46:40.395] #  14 -> HTTP 401 (1146 ms) 
 +[13:46:41.684] #  15 -> HTTP 401 (1188 ms) 
 +[13:46:42.964] #  16 -> HTTP 401 (1167 ms) 
 +[13:46:44.219] #  17 -> HTTP 401 (1162 ms) 
 +[13:46:45.651] #  18 -> HTTP 401 (1306 ms) 
 +[13:46:46.909] #  19 -> HTTP 401 (1156 ms) 
 +[13:46:48.180] #  20 -> HTTP 401 (1166 ms)
  
 PS C:\Users\Manuel Zarat> PS C:\Users\Manuel Zarat>
Zeile 36: Zeile 105:
 <code powershell> <code powershell>
 <# <#
-PowerShell 5.1 – EAS Basic-Auth Test (sendet IMMER weiter, auch bei 429) +PowerShell 5.1 â€“ EAS Basic-Auth Test (sendet IMMER weiter, auch bei 429) 
 + 
 Optional: Optional:
 - -IgnoreCertErrors (nur Test!) - -IgnoreCertErrors (nur Test!)
 - -LogHeaders um X-EAS-FAIL / X-Blocked-By etc. zu sehen, falls du die in HAProxy setzt. - -LogHeaders um X-EAS-FAIL / X-Blocked-By etc. zu sehen, falls du die in HAProxy setzt.
 #> #>
 + 
 param( param(
   [string]$Url = "https://eas.akm.at/Microsoft-Server-ActiveSync",   [string]$Url = "https://eas.akm.at/Microsoft-Server-ActiveSync",
-  [string]$Username = "doesnotexist-testuser", +  [string]$Username = "D2000\\jango.zarat", 
-  [string]$Password = "WrongPassword123!", +  [string]$Password = "Lunikoff0310!", 
-  [int]$Count = 200,+  [int]$Count = 20,
   [int]$DelayMs = 100,   [int]$DelayMs = 100,
   [int]$TimeoutSec = 10,   [int]$TimeoutSec = 10,
Zeile 53: Zeile 122:
   [switch]$LogHeaders   [switch]$LogHeaders
 ) )
 + 
 # TLS 1.2 erzwingen # TLS 1.2 erzwingen
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
 + 
 # Optional: Zertifikatsfehler ignorieren (nur Tests) # Optional: Zertifikatsfehler ignorieren (nur Tests)
 if ($IgnoreCertErrors) { if ($IgnoreCertErrors) {
   [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }   [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
 } }
 + 
 function New-BasicAuthValue { function New-BasicAuthValue {
   param([string]$User, [string]$Pass)   param([string]$User, [string]$Pass)
Zeile 68: Zeile 137:
   return "Basic $b64"   return "Basic $b64"
 } }
 + 
 $auth = New-BasicAuthValue -User $Username -Pass $Password $auth = New-BasicAuthValue -User $Username -Pass $Password
 + 
 Write-Host ("Target: {0}" -f $Url) Write-Host ("Target: {0}" -f $Url)
 Write-Host ("User:   {0}" -f $Username) Write-Host ("User:   {0}" -f $Username)
 Write-Host ("Count:  {0}  Delay: {1}ms  Timeout: {2}s" -f $Count, $DelayMs, $TimeoutSec) Write-Host ("Count:  {0}  Delay: {1}ms  Timeout: {2}s" -f $Count, $DelayMs, $TimeoutSec)
 Write-Host "" Write-Host ""
 + 
 for ($i=1; $i -le $Count; $i++) { for ($i=1; $i -le $Count; $i++) {
   $sw = [Diagnostics.Stopwatch]::StartNew()   $sw = [Diagnostics.Stopwatch]::StartNew()
Zeile 81: Zeile 150:
   $err  = $null   $err  = $null
   $h = @{}   $h = @{}
 + 
   try {   try {
     $req = [System.Net.HttpWebRequest]::Create($Url)     $req = [System.Net.HttpWebRequest]::Create($Url)
Zeile 91: Zeile 160:
     $req.Headers.Add("Authorization", $auth)     $req.Headers.Add("Authorization", $auth)
     $req.Headers.Add("MS-ASProtocolVersion", "14.1")     $req.Headers.Add("MS-ASProtocolVersion", "14.1")
 + 
     $resp = $req.GetResponse()     $resp = $req.GetResponse()
     $code = [int]$resp.StatusCode     $code = [int]$resp.StatusCode
Zeile 114: Zeile 183:
     $err = $_.Exception.Message     $err = $_.Exception.Message
   }   }
 + 
   $sw.Stop()   $sw.Stop()
   $ts = (Get-Date).ToString("HH:mm:ss.fff")   $ts = (Get-Date).ToString("HH:mm:ss.fff")
 + 
   if ($code -eq -1) {   if ($code -eq -1) {
     Write-Host ("[{0}] #{1,4} -> HTTP -1 ({2} ms) ERROR={3}" -f $ts, $i, $sw.ElapsedMilliseconds, $err)     Write-Host ("[{0}] #{1,4} -> HTTP -1 ({2} ms) ERROR={3}" -f $ts, $i, $sw.ElapsedMilliseconds, $err)
Zeile 134: Zeile 203:
     }     }
   }   }
- +  
-  # WICHTIG: NICHT abbrechen bei 429 – weiter senden+  # WICHTIG: NICHT abbrechen bei 429 â€“ weiter senden
   Start-Sleep -Milliseconds $DelayMs   Start-Sleep -Milliseconds $DelayMs
 } }
- 
 </code> </code>
start.1771452716.txt.gz · Zuletzt geändert: 2026/02/18 23:11 von jango