UDP port scanning using PowerShell
Performing UDP port scanning in PowerShell involves sending UDP packets to specific ports on a target host to determine whether those ports are open or closed. Unlike TCP, UDP is connectionless, which makes UDP port scanning a bit more challenging, as there are no handshakes to confirm the port’s status. Here’s a simplified method using PowerShell:
$RHost = "192.168.1.100"
$Ports = 53, 67, 123
foreach ($Port in $Ports) {
    $UdpClient = New-Object System.Net.Sockets.UdpClient
    try {
        $UdpClient.Connect($RHost, $Port)
        $UdpClient.Send([byte[]](0), 0, 0)
        Write-Host "UDP Port $Port open - $RHost"
    }
    catch {
        Write-Host "UDP Port $Port...