We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 60f0821 + c2feb17 commit 293f5eaCopy full SHA for 293f5ea
src/pyshark/tshark/tshark.py
@@ -138,8 +138,13 @@ def get_ek_field_mapping(tshark_path=None):
138
mapping = json.loads(
139
mapping,
140
object_pairs_hook=_duplicate_object_hook)["mappings"]
141
- if "doc" in mapping:
+ # If using wireshark 4, the key "mapping" contains what we want,
142
+ if "dynamic" in mapping and "properties" in mapping:
143
+ pass
144
+ # if using wireshark 3.5 to < 4 the data in "mapping.doc",
145
+ elif "doc" in mapping:
146
mapping = mapping["doc"]
147
+ # or "mapping.pcap_file" if using wireshark < 3.5
148
elif "pcap_file" in mapping:
149
mapping = mapping["pcap_file"]
150
else:
0 commit comments