Extract Ethernet, Ip Header, Tcp And Payload From Socket Recv Python
How can I extract Extract Ethernet, IP header, TCP and payload from socket.recv in Python Right now I can obtain information above using socket.recvfrom(): packet = s.recvfrom(
Solution 1:
Thanks I recognized that socket.recv() returns a type str and socket.recvfrom() returns a tuple type, hence for socket.recv() I omitted packet = packet[0]. I will update code to handle TCP header to be variable.
Post a Comment for "Extract Ethernet, Ip Header, Tcp And Payload From Socket Recv Python"