March 2nd, 2013, 09:48 AM
Python with Wireshark to monitor and save activity log
I am a beginner in Python and I need some help with this programming language.
I need to write a program which could save Wireshark logs to my desired folder into one file. The internet activity I need to capture is websites.
There is this code for Tshark on Ubuntu:
"sudo tshark -i wlan0 "host 192.168.1.100 and port 45000" -d tcp.port==45000,http -T pdml > dump.xml"
but when I remove sudo and change the IP address to mine, Tshark on windows (I am using windows 7) the Tshark doesn't recognize "wlan" acronym (I googled equivalent of wlan for windows, but no luck) so I even though the task looks simple, it is not for me, so I would like somebody to help there or at least to give some links to tutorials. And many thanks to those who could help me!!
March 2nd, 2013, 11:30 AM
I got some update here:
I managed Tshark make XML file I wanted so now I need Python to open it, modify by removing all the garbage unneeded text from there and leave only addresses of websites.
March 2nd, 2013, 11:55 AM
In addition to learning python syntax, built in data structures, the methods for operating operating on them, the reasons for "frozenset" versus "set", tuples vs. lists and other immutable/mutable pairs, then look into the xml parsers:
[/code] are essential for python code and Makefiles!