lib/shaddox/target.rb in shaddox-0.0.10 vs lib/shaddox/target.rb in shaddox-0.0.11

- old
+ new

@@ -122,19 +122,19 @@ @ssh.open_channel do |channel| channel.exec(command) do |ch, success| #return nil if !success ch.on_data do |ch, data| $stdout.print data - if data =~ /^\[sudo\] password for user:/ + if data =~ /^\[sudo\]|Password/i channel.send_data(gets.strip) end end - ch.on_extended_data do |ch, data| - $stderr.print data - if data =~ /^\[sudo\] password for user:/ - channel.send_data(gets.strip) - end - end + #ch.on_extended_data do |ch, data| + #$stderr.print data + #if data =~ /^\[sudo\] password for user:/ + #channel.send_data(gets.strip) + #end + #end ch.on_request('exit-status') do |ch, data| exit_code = data.read_long end end end