We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi,
your code is not IPv6 save:
if($GelfServer -notmatch "^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$") { $GelfServer = [String]$([System.Net.Dns]::GetHostAddressesAsync($GelfServer)).Result[0] } # Create a UDP client to be used to send data $Address = [system.net.IPAddress]::Parse($GelfServer) $EndPoint = New-Object System.Net.IPEndPoint($Address, $Port) $UdpClient = new-Object System.Net.Sockets.UdpClient .... $UDPclient.SendAsync($CompressedJSON, $CompressedJSON.Length,$EndPoint) | Out-Null
Why not use [system.net.IPAddress]::Parse($GelfServer) instead of the regex? Then check if Address is IPv4 or IPv6 and set the right address family?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi,
your code is not IPv6 save:
Why not use [system.net.IPAddress]::Parse($GelfServer) instead of the regex?
Then check if Address is IPv4 or IPv6 and set the right address family?
The text was updated successfully, but these errors were encountered: