2 lines
328 B
Plaintext
2 lines
328 B
Plaintext
UserParameter=port.discovery[*],powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$raw = '$1'; $list = foreach($entry in ($raw -split ',')){ $port = $entry.Trim(); $n = 0; if([int]::TryParse($port, [ref]$n) -and $n -ge 1 -and $n -le 65535){ @{ '{#PORT}' = $port } } }; @{ data = @($list) } | ConvertTo-Json -Compress"
|