

Step-5: Creating a function that extracts Server Names from TLS client hello packetsĬreate a function that extracts Server Names from TLS client hello packets.ĪLSO READ: Steps to troubleshoot with TTL in Wireshark with Examples Step-6: Creating a function that extracts URLs from http/https packetsĬreate a function that extracts URLS from http/https packets. Packets = filter_packets(file_path, "ip") # this list will store all IP addresses except the private ones Step-4: Creating a function that extracts IP addresses from IP headersĬreate a function that extracts IP addresses from IP headers. Packets = filter_packets(file_path, "dns") # this list will store all domain names in the dns packets Step-3: Creating a function for extracting DNS resource recordsĬreate a function that extracts Domain Names from DNS packets. def filter_packets(file_path, disp_filter):Ĭapture = pyshark.FileCapture(file_path, display_filter=disp_filter) Since Pyshark is just a wrapper of Thsark, you can even use the same filter in Wireshark as well or you can use your saved display filter from Wireshark. Step-2: Creating a display filter for interesting trafficĬreate a function that takes a file and display filter.

Step-1: Importing required Python modules For more information please read this article )

URLs from http/https requests (Unless you provide the SSL/TLS keys to Wireshark, you will not be able to obtain the URLSs from https.Server Names (Domain Name) from TLS client hello packets.
