Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
KimiNewt committed May 8, 2019
2 parents ddf2480 + 4d1b190 commit d8b0c00
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/pyshark/capture/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,16 @@ def get_parameters(self, packet_count=None):
params += ["-x"]
if packet_count:
params += ['-c', str(packet_count)]

if self._custom_parameters:
for key, val in self._custom_parameters.items():
params += [key, val]
if isinstance(self._custom_parameters, list):
params += self._custom_parameters
elif isinstance(self._custom_parameters, dict):
for key, val in self._custom_parameters.items():
params += [key, val]
else:
raise Exception("Custom parameters type not supported.")

if all(self.encryption):
params += ['-o', 'wlan.enable_decryption:TRUE', '-o', 'uat:80211_keys:"' + self.encryption[1] + '","' +
self.encryption[0] + '"']
Expand Down

0 comments on commit d8b0c00

Please sign in to comment.