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.target = target
self.cmd = [ self.cmd = []
"stdbuf", "-o0", # No buffer. See https://stackoverflow.com/a/40453613/7510292
if Process.exists('stdbuf'):
self.cmd.extend([
"stdbuf", "-o0" # No buffer. See https://stackoverflow.com/a/40453613/7510292
])
self.cmd.extend([
"bully", "bully",
"--bssid", target.bssid, "--bssid", target.bssid,
"--channel", target.channel, "--channel", target.channel,
@@ -36,7 +42,7 @@ class Bully(Attack):
"-v", "4", "-v", "4",
"--pixiewps", "--pixiewps",
Configuration.interface Configuration.interface
] ])
self.bully_proc = None self.bully_proc = None