Bash
1 2 3 |
#Servidor #Abrir el puerto 5010 para establecer comunicación nc -l 5010 |
PowerShell
1 2 3 4 5 6 |
#Cliente $ip=[IPAddress]"192.168.1.162" $TcpClient=New-Object System.Net.Sockets.TcpClient($ip, "5010") $mensaje=New-Object System.IO.StreamWriter $TcpClient.GetStream() $mensaje.Write("hola----------") $mensaje.Dispose() |