From 52a502cc5a87e8968d2e9f95e580792462906212 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Tue, 23 Jul 2024 17:40:32 +0200 Subject: [PATCH] Update list-ip-addresses.ps1 --- scripts/list-ip-addresses.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/list-ip-addresses.ps1 b/scripts/list-ip-addresses.ps1 index 784c0e56..7acb295b 100755 --- a/scripts/list-ip-addresses.ps1 +++ b/scripts/list-ip-addresses.ps1 @@ -5,7 +5,7 @@ This PowerShell script queries all IP address information and prints it. .EXAMPLE PS> ./list-ip-addresses.ps1 - ✅ Public IP address 185.72.229.161, 2003:f2:6128:fd01:e543:601:30c2:a028 near Munich, Germany + ✅ Public IP 185.72.229.161, 2003:f2:6128:fd01:e543:601:30c2:a028 near Munich, Germany .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -26,7 +26,7 @@ function WriteLocalInterface($interface) { } } if ($IPv4 -ne "" -or $IPv6 -ne "") { - Write-Host "✅ Local $interface IP address $IPv4/$prefixLen, $IPv6" + Write-Host "✅ Local $interface IP $IPv4/$prefixLen, $IPv6" } } @@ -51,7 +51,7 @@ try { if ("$publicIPv6" -eq "") { $publicIPv6 = "no IPv6" } if ("$city" -eq "") { $city = "unknown city" } if ("$country" -eq "") { $country = "unknown country" } - Write-Host "✅ Public IP address $publicIPv4, $publicIPv6 near $city, $country" ; if ($country -eq "Russia") { Write-Host -foregroundColor red "DON'T TRUST PUTIN !!! FLEE NOW OR DIE AS SOLDIER IN UKRAINE !!!" } + Write-Host "✅ Public IP $publicIPv4, $publicIPv6 near $city, $country" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"