Update Python Ofensivo - Pruebas de conexión UDP con la librería socket

This commit is contained in:
2024-01-11 21:43:05 +01:00
parent ec29b5cde0
commit f09fa0cbf5
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import socket
def start_udp_client():
host = 'localhost'
port = 1234
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
msg = 'Hola Servidor UDP! Se está tensando para pasar tildes'.encode(
'utf-8')
s.sendto(msg, (host, port))
start_udp_client()