Skip to content

Implement basic PCAP parser - #9

Merged
tuxuser merged 5 commits into
developfrom
tuxuser/task/pcap_reader
Feb 21, 2021
Merged

tuxuser merged 5 commits into
developfrom
tuxuser/task/pcap_reader

Conversation

@tuxuser

@tuxuser tuxuser commented Feb 21, 2021

Copy link
Copy Markdown
Member

PCAP parser prints basic metadata

Usage

xcloud-pcap-reader some_capture.pcap

Sample output:

TEREDO: TeredoPacket(IPv6=IPv6Packet(V=6, SRC=b' \x01\x00\x003\x8c$\xf4\x04;0\xe3\xd2\xf3\xc9=', DST=b' \x01\x00\x003\x8c$\xf4\x1c8\xf3\xfd\xd2\xf3\xc9=', PLEN=104 NEXT=17 HLIM=21), SRC=TeredoEndpoint(teredo_server_ipv4=IPv4Address('51.140.36.244'), flags=1083, udp_port=53020, client_pub_ipv4=IPv4Address('45.12.54.194')), DST=TeredoEndpoint(teredo_server_ipv4=IPv4Address('51.140.36.244'), flags=7224, udp_port=3074, client_pub_ipv4=IPv4Address('45.12.54.194')))
 -> TEREDO-WRAPPED: STUN: Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'C\xf6B\x99\xac3\xffY&\xcdM\x8f')
TEREDO: TeredoPacket(IPv6=IPv6Packet(V=6, SRC=b' \x01\x00\x003\x8c$\xf4\x1c8\xf3\xfd\xd2\xf3\xc9=', DST=b' \x01\x00\x003\x8c$\xf4\x04;0\xe3\xd2\xf3\xc9=', PLEN=104 NEXT=17 HLIM=128), SRC=TeredoEndpoint(teredo_server_ipv4=IPv4Address('51.140.36.244'), flags=7224, udp_port=3074, client_pub_ipv4=IPv4Address('45.12.54.194')), DST=TeredoEndpoint(teredo_server_ipv4=IPv4Address('51.140.36.244'), flags=1083, udp_port=53020, client_pub_ipv4=IPv4Address('45.12.54.194')))
 -> TEREDO-WRAPPED: STUN: Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\x9e\xfeI?\xbcM\xd7g\xe0o%\xee')
STUN: Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b'\x86\xf4@_\xb6\xdb\xb4Xs\xe0fO')
STUN: Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b':\xe2E\xc1\xa3,\xf8n\xd0\xad\xf0n')
STUN: Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b':\xe2E\xc1\xa3,\xf8n\xd0\xad\xf0n')
STUN: Message(message_method=Method.BINDING, message_class=Class.REQUEST, transaction_id=b's!F\xe3\xbe\xa1\x14\x16\xda{6\xbe')
STUN: Message(message_method=Method.BINDING, message_class=Class.RESPONSE, transaction_id=b's!F\xe3\xbe\xa1\x14\x16\xda{6\xbe')
RTP: UDPConnectionProbing RtpPacket(seq=0, ts=0, marker=0, payload=102, 1452 bytes) SSRC=0
RTP: UDPConnectionProbing RtpPacket(seq=1, ts=0, marker=0, payload=102, 1452 bytes) SSRC=0

@tuxuser
tuxuser changed the base branch from master to develop February 21, 2021 22:53
@tuxuser
tuxuser merged commit c4cbef4 into develop Feb 21, 2021
@tuxuser
tuxuser deleted the tuxuser/task/pcap_reader branch February 21, 2021 22:54
@tuxuser tuxuser mentioned this pull request Feb 22, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant