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

- old
+ new

@@ -126,9 +126,15 @@ $stdout.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