12 lines
824 B
PowerShell
12 lines
824 B
PowerShell
[Console]::OutputEncoding = [Text.Encoding]::UTF8
|
|
$cap = "$env:TEMP\opencode\hd_claim3.pcap"
|
|
Remove-Item $cap -ErrorAction SilentlyContinue
|
|
$ts = "C:\Program Files\Wireshark\tshark.exe"
|
|
$proc = Start-Process -FilePath $ts -ArgumentList "-i `"\Device\NPF_{E7165B1C-BAF6-49CF-9A3D-EF12DBC17329}`" -f `"udp port 31772`" -a duration:420 -w `"$cap`"" -PassThru -WindowStyle Hidden -RedirectStandardError "$env:TEMP\opencode\tshark_err5.txt"
|
|
Start-Sleep -Seconds 2
|
|
Set-Location "C:\Users\tonycao\work\light\enet-validator"
|
|
& .\target\release\enet-validator.exe hostdemo 192.168.123.1 30
|
|
Start-Sleep -Seconds 5
|
|
Write-Host "`n=== claim window in capture ==="
|
|
& $ts -r $cap -Y "udp.length==110 or udp.length==55 or udp.length==560" -T fields -e frame.time_relative -e ip.src -e ip.dst -e udp.length 2>$null | Select-Object -First 12
|