Write Python Program Using Sockets Read Udp Packets Pcap Files Q37100095

write a python program using sockets to read udp packets from apcap files


Solution


Code:

from socket import *IPv4 = “”Port = 54345ServerSock = socket(AF_INET, SOCK_DGRAM) # UDPServerSock.bind((IPv4, Port))print “Socket is ready to receive data..”while True: data, addr = ServerSock.recvfrom(1024) # buffer size is 1024 bytes print data

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.