Skip to content

Commit 62eb13a

Browse files
committed
Update check-dns.ps1
1 parent 9129205 commit 62eb13a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Scripts/check-dns.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@
1212
#>
1313

1414
try {
15-
Write-Progress "Step 1/2 - Reading from Data/frequent-domains.csv..."
15+
Write-Progress "(1/2) Loading Data/frequent-domains.csv..."
1616
$Table = Import-CSV "$PSScriptRoot/../Data/frequent-domains.csv"
1717
$NumRows = $Table.Length
1818

19-
Write-Progress "Step 2/2 - Resolving $NumRows domains..."
19+
Write-Progress "(2/2) Resolving $NumRows domains..."
2020
$StopWatch = [system.diagnostics.stopwatch]::startNew()
2121
if ($IsLinux) {
2222
foreach($Row in $Table){$nop=dig $Row.Domain +short}
2323
} else {
2424
foreach($Row in $Table){$nop=Resolve-DNSName $Row.Domain}
2525
}
26-
2726
[float]$Elapsed = $StopWatch.Elapsed.TotalSeconds
28-
$Average = [math]::round($NumRows / $Elapsed, 1)
2927

28+
$Average = [math]::round($NumRows / $Elapsed, 1)
3029
if ($Average -gt 10.0) {
3130
"✅ DNS resolves $Average domains per second"
3231
} else {
@@ -36,4 +35,4 @@ try {
3635
} catch {
3736
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
3837
exit 1
39-
}
38+
}

0 commit comments

Comments
 (0)