-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCountryChecker.ps1
More file actions
29 lines (23 loc) · 994 Bytes
/
CountryChecker.ps1
File metadata and controls
29 lines (23 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Clear-Host
Write-Host "Country Checker" -ForegroundColor Yellow
Write-Host "Made by " -ForegroundColor DarkGray -NoNewline
Write-Host "HadronCollision"
Write-Host ""
$vpn = Get-NetAdapter | Where-Object { -not $_.MacAddress -and $_.Status -eq "Up" } | Select-Object -ExpandProperty Name
$ipInfo = Invoke-RestMethod -Uri "https://api.ip2location.io/" -UseBasicParsing
if ($ipInfo -and $ipInfo.country_name) {
Write-Host "Country: $($ipInfo.country_name)" -ForegroundColor DarkCyan
} else {
Write-Host "Could not retrieve country information."
}
if ($vpn -or $ipInfo.is_proxy) {
Write-Host ""
Write-Host "VPN Detected!!!" -ForegroundColor Red
Write-Host "- $vpn" -ForegroundColor DarkGray
}
Write-Host ""
$motherboardId = (Get-WmiObject win32_baseboard).SerialNumber
$disksId = (Get-Disk).SerialNumber
$hwid = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("$motherboardId $disksId")).Replace("=", "")
Write-Host "HWID: $hwid" -ForegroundColor Cyan
Write-Host ""