Change to udp with the sockets
This commit is contained in:
@ -17,7 +17,7 @@ BUFFER_SIZE = 128
|
||||
SEPARATOR = "<SEPARATOR>"
|
||||
# create the server socket
|
||||
# TCP socket
|
||||
s = socket.socket()
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
# bind the socket to our local address
|
||||
s.bind((SERVER_HOST, SERVER_PORT))
|
||||
# enabling our server to accept connections
|
||||
|
@ -24,7 +24,7 @@ filename = "screen.jpg"
|
||||
filesize = os.path.getsize(filename)
|
||||
|
||||
# create the client socket
|
||||
s = socket.socket()
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
print(f"[+] Connecting to {host}:{port}")
|
||||
s.connect((host, port))
|
||||
print("[+] Connected.")
|
||||
|
Reference in New Issue
Block a user