Commit b681ce1b authored by Rohit Gupta's avatar Rohit Gupta

fix for sudo execution

parent 0bd70426
...@@ -182,7 +182,7 @@ class core: ...@@ -182,7 +182,7 @@ class core:
self.wait_quiet() self.wait_quiet()
if sudo == True: if sudo == True:
#command = 'echo \'' + self.password + '\' | sudo -S -E ' + command #command = 'echo \'' + self.password + '\' | sudo -S -E ' + command
command = 'echo \'' + password + '\' | sudo -S -E bash -c \' ' + cmd + '\' ' command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
if self.send_cr: if self.send_cr:
log.stats['cmd'] += 1 log.stats['cmd'] += 1
self.oai.sendline(command) self.oai.sendline(command)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment