Question: You are required to develop a UDP secure socket and successfully transmit packets between two Virtual Machines. You may use any programming language you are

You are required to develop a UDP secure socket and successfully transmit packets between two Virtual Machines. You may use any programming language you are familiar with to write the code (ex. C++, Java, Python). You MUST ensure that authentication and confidentiality services are deployed using relevant protocols at different layers, for instance TLS, SSL or IPSec.

Using Wireshark, a live demonstration of packets transmission should be presented or recorded, and screen shoots must clearly reflect this in the report. Make sure to capture source and destination IPs and packets of related authentication and confidentiality protocols also must be clearly reflected and captured.

add password in client.py to allow send and receive message with server.py in oracle virtual box Send and receive UDP packets via Python https://linuxhint.com/send_receive_udp_python/

server.py

import socket import sys if len(sys.argv) == 3: # Get "IP address of Server" and also the "port number" from argument 1 and argument 2 ip = sys.argv[1] port = int(sys.argv[2]) else: print("Run like : python3 server.py ") exit(1) # Create a UDP socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Bind the socket to the port server_address = (ip, port) s.bind(server_address) print("Do Ctrl+c to exit the program !!") while True: print("####### Server is listening #######") data, address = s.recvfrom(4096) print(" 2. Server received: ", data.decode('utf-8'), " ") send_data = input("Type some text to send => ") s.sendto(send_data.encode('utf-8'), address) print(" 1. Server sent : ", send_data," ")

client.py

import socket import sys if len(sys.argv) == 3: # Get "IP address of Server" and also the "port number" from argument 1 and argument 2 ip = sys.argv[1] port = int(sys.argv[2]) else: print("Run like : python3 client.py ") exit(1) # Create socket for server s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0) print("Do Ctrl+c to exit the program !!") # Let's send data through UDP protocol while True: send_data = input("Type some text to send =>"); s.sendto(send_data.encode('utf-8'), (ip, port)) print(" 1. Client Sent : ", send_data, " ") data, address = s.recvfrom(4096) print(" 2. Client received : ", data.decode('utf-8'), " ") # close the socket s.close()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!