8000 Named pipe and tshark support by joelsernamoreno · Pull Request #140 · P1sec/QCSuper · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Named pipe and tshark support #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joelsernamoreno
Copy link

Hello

I have added tshark support:
./qcsuper.py --usb-modem /dev/ttyUSB0 --tshark

Additionally, you can now use external scripts to analyze packages:
./qcsuper.py --usb-modem /dev/ttyUSB0 --analyze | python3 processor.py

processor.py example:

import os

def read_from_pipe(pipe_path='/tmp/tshark_pipe'):
    if not os.path.exists(pipe_path):
        print(f"Error: The named pipe {pipe_path} does not exist. Make sure that TsharkLive has created it.")
        return

    try:
        with open(pipe_path, 'r') as pipe:
            for line in pipe:
                print(f"{line.strip()}")
    except KeyboardInterrupt:
        print("\n")
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    read_from_pipe()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0