Search code examples
python-3.xraspberry-pi3tsharkspoofing

How could i add a condition stop to ettercap command?


I can stop manually the ettercap task with “q” key but i need add a condition stop to my python3 script to automate my process. Could someone help me?

Pd: sorry for my poor english.

Thanks,

Antonio.


Solution

  • I don't know anything about ettercap, or even what it is, but as a worst-case hackish solution you could send a q into ettercap when it's time to stop.

    With a program like this:

    import time
    
    while not condition:
        time.sleep(0.01)
    print("q")
    

    you could run it like this:

    python the_above_program.py | ettercap thing
    

    and it would stop when the Python program detected it should.