You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Recently I was looking for a Python script to extract objects from pcap files. I found that pyshark is a tshark wrapper, however non of it methods fullfilled my expectations in this field.
Describe the solution you'd like
I wrote code which wraps tshark --export-objects command, what allows you to pass pcap file path and retrieve exported objects. The code is shown below:
I wonder if this could be a part of pyshark library. The code is a concept and using colors/print here (termcolor/rich/ansi coloring) is just for better view/debug, however personally I would leave some sort of red color styling for errors handling.
I'm interested if you like this idea. I could modify the code to fit your package needs if so. I'm waiting for your feedback. Thanks!
Describe alternatives you've considered
I haven't found any Python like alternative for this purpose
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
--export-objects
command, what allows you to pass pcap file path and retrieve exported objects. The code is shown below:Example of pcaps for tests/debug:
How to quickly test this code?
http_with_jpegs.cap.gz
file (middle one from the above list)Screenshots:
exported objects view:
![http-export](https://private-user-images.githubusercontent.com/23298059/242715907-13493d9a-a3fc-4da9-8ff8-b666057364ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MDU2MDIsIm5iZiI6MTcyMTcwNTMwMiwicGF0aCI6Ii8yMzI5ODA1OS8yNDI3MTU5MDctMTM0OTNkOWEtYTNmYy00ZGE5LThmZjgtYjY2NjA1NzM2NGFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDAzMjgyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI3Y2RlM2VkYWVjMGMyZTUxYjBmYWZlNzBiZjc0YzU5NmUwYjRmNDczMmIyODc0YThkZGI5OGM3ZTA1Yjc2ZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hWGJKkyKK4ZMXEa5rDwfFdgMVoQRr37l_igCVUntZLM)
non-existing tshark path error view:
![non-existing-tshark](https://private-user-images.githubusercontent.com/23298059/242715995-c2d6403b-d52a-4966-a3ee-b8cd14deace5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MDU2MDIsIm5iZiI6MTcyMTcwNTMwMiwicGF0aCI6Ii8yMzI5ODA1OS8yNDI3MTU5OTUtYzJkNjQwM2ItZDUyYS00OTY2LWEzZWUtYjhjZDE0ZGVhY2U1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDAzMjgyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0NGUyMzJhY2QzODRjN2YxZTg2MTA4NjFjNTA4NTE3MjJmYjJhYTU2MjlkZDIzNmU1Y2ExOGRmZTY3MWNkMWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UWai-E72f2t2nab0DXzl1wDwSRFpm5SrQXsewecFtCY)
non-existing pcap path error view:
![wrong-pcap-path](https://private-user-images.githubusercontent.com/23298059/242716064-e91976e0-0909-4f92-ad11-cbb6abf0eb26.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MDU2MDIsIm5iZiI6MTcyMTcwNTMwMiwicGF0aCI6Ii8yMzI5ODA1OS8yNDI3MTYwNjQtZTkxOTc2ZTAtMDkwOS00ZjkyLWFkMTEtY2JiNmFiZjBlYjI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDAzMjgyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlkOWZiY2Q1NGFkNTg0ZWFkY2Y3MDhlNjFhODU5ODQzOGFhNTM5ZjVmOWRkZjk2M2M2MzFjZjI4YmJiMzRjNmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1CfxE7aMKuU_QJ7zhNs6g4a6vx-4WSHdDDAP44fTs4U)
I wonder if this could be a part of pyshark library. The code is a concept and using colors/print here (termcolor/rich/ansi coloring) is just for better view/debug, however personally I would leave some sort of red color styling for errors handling.
I'm interested if you like this idea. I could modify the code to fit your package needs if so. I'm waiting for your feedback. Thanks!
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: