I would like to run the following commands directly in Python
:
dumpcap -q -f http -i eth0 -w - | tshark -l -n -T json -r - | my_app.py
I would like to run it by using subprocess
and asyncio
for having it run in async
.
So at first I would like to run:
dumpcap -q -f http -i eth0 -w -
The output from this should be piped into the next command, which should/could run unsynchronized:
tshark -l -n -T json -r -
The output from this should be piped into a stream which I can work with.
Is there a straightforward solution for this?