Skip to content

Commit e8c0843

Browse files
committed
Use stdbuf only if it exists
1 parent 5db801b commit e8c0843

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

wifite/tools/bully.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ def __init__(self, target):
2626

2727
self.target = target
2828

29-
self.cmd = [
30-
"stdbuf", "-o0", # No buffer. See https://stackoverflow.com/a/40453613/7510292
29+
self.cmd = []
30+
31+
if Process.exists('stdbuf'):
32+
self.cmd.extend([
33+
"stdbuf", "-o0" # No buffer. See https://stackoverflow.com/a/40453613/7510292
34+
])
35+
36+
self.cmd.extend([
3137
"bully",
3238
"--bssid", target.bssid,
3339
"--channel", target.channel,
@@ -36,7 +42,7 @@ def __init__(self, target):
3642
"-v", "4",
3743
"--pixiewps",
3844
Configuration.interface
39-
]
45+
])
4046

4147
self.bully_proc = None
4248

0 commit comments

Comments
 (0)