Subprocess Grab Stdout Of Airodump-ng
I am trying to grab the stdout from airodump-ng using subprocess with no luck. I think my code causes a deadlock. airodump = subprocess.Popen(['airodump-ng','mon0'],stdin=subpro
Solution 1:
Don't sleep and wait (that will just cause airodump to block on a full pipe buffer) and don't use an unbounded read(). The communicate() method does what you need:
o_airodump, unused_stderr = airodump.communicate(timeout=15)
airodump.kill()
Note: The timeout parameter on communicate was introduced in Python 3.3 which isn't quite out yet. ;)
Post a Comment for "Subprocess Grab Stdout Of Airodump-ng"