KimiNewt / pyshark

Python wrapper for tshark, allowing python packet parsing using wireshark dissectors
MIT License
2.23k stars 422 forks source link

output of `tshark -D` needs to be parsed differently #54

Closed goretkin closed 9 years ago

goretkin commented 9 years ago

In my version of tshark (1.12.3), the output of the command may have changed.

In [2]: pyshark.tshark.tshark.get_tshark_interfaces()
Out[2]: [u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9', u'10', u'11']

In [3]: exit()
~/nidaq$ tshark -D
1. wlan0
2. vmnet1
3. vmnet8
4. any
5. lo (Loopback)
6. nflog
7. nfqueue
8. dbus-system
9. dbus-session
10. usbmon1
11. usbmon2
bbayles commented 9 years ago

I think the discussion in #57 took care of this. I've added tests for the function in #58. I'll close this issue once the latter is merged.

bbayles commented 9 years ago

Closing this, since #58 adds a docstring to explain the usage of get_tshark_interfaces.