Use stdbuf only if it exists

This commit is contained in:
derv82
2018-04-01 01:09:57 -04:00
parent 5db801b414
commit e8c0843bdf

View File

@@ -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