From e8c0843bdff44c0a7e9c24fd0dd32f934cc92bad Mon Sep 17 00:00:00 2001 From: derv82 Date: Sun, 1 Apr 2018 01:09:57 -0400 Subject: [PATCH] Use stdbuf only if it exists --- wifite/tools/bully.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wifite/tools/bully.py b/wifite/tools/bully.py index 103f408..c0a19f9 100755 --- a/wifite/tools/bully.py +++ b/wifite/tools/bully.py @@ -26,8 +26,14 @@ class Bully(Attack): self.target = target - self.cmd = [ - "stdbuf", "-o0", # No buffer. See https://stackoverflow.com/a/40453613/7510292 + self.cmd = [] + + if Process.exists('stdbuf'): + self.cmd.extend([ + "stdbuf", "-o0" # No buffer. See https://stackoverflow.com/a/40453613/7510292 + ]) + + self.cmd.extend([ "bully", "--bssid", target.bssid, "--channel", target.channel, @@ -36,7 +42,7 @@ class Bully(Attack): "-v", "4", "--pixiewps", Configuration.interface - ] + ]) self.bully_proc = None