File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212#>
1313
1414try {
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 {
3635} catch {
3736 " ⚠️ Error in line $ ( $_.InvocationInfo.ScriptLineNumber ) : $ ( $Error [0 ]) "
3837 exit 1
39- }
38+ }
You can’t perform that action at this time.
0 commit comments