1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | gc ficheromails.txt | %{ $_ try{ #Con Invoke-WebRequest da error al cargar el certificado, mejor descargar el fichero JSON resultado Start-BitsTransfer "https://haveibeenpwned.com/api/breachedaccount/$_" -Destination resultado.txt "Cuenta comprometida" "La cuenta ha sido comprometida en: " gc .\resultado.txt | ConvertFrom-JSON } catch { if($_.Exception.Response.StatusCode.Value__ -eq 404) { "Cuenta no comprometida" } } } |
Comprobar si las cuentas de correo electrónico almacenadas en un fichero han sido comprometidas en alguna fuga de datos (Web, Seguridad, PowerShell)
Except where otherwise noted, Jesusninoc by Jesús N. is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.