# send-udp # # Simple Tool to send UDP-Ports to a range with a various source port range. # you can use Netmon/WireShark on the target to see the incomping traffic. # i have NO listener to listen on all ports # # # Links: http://pshscripts.blogspot.de/2008/12/send-udpdatagramps1.html param ( [string]$remoteip = "239.193.0.11", # IP to send to [int]$remoteudpport=10101, # port to send to [int]$sourceudpport = 0, # SourcePort, maybe empty uses and available port [string]$buffer = "SendUDP Message by msxfaq" ) $udpClient = new-Object system.Net.Sockets.Udpclient($sourceport) $byteBuffer = [System.Text.Encoding]::ASCII.GetBytes($Buffer) $sendbytes = $udpClient.Send($byteBuffer, $byteBuffer.length, $remoteip, $remoteudpport) if ($sendbytes -ne $byteBuffer.length) { write-host "Mismatch bytes" }