lib/rex/ui/interactive.rb in librex-0.0.28 vs lib/rex/ui/interactive.rb in librex-0.0.29

- old
+ new

@@ -106,10 +106,13 @@ # # Whether or not the session has completed interaction # attr_accessor :completed + attr_accessor :on_print_proc + attr_accessor :on_command_proc + protected # # The original suspend proc. # @@ -146,18 +149,20 @@ # Read from remote and write to local. # def _stream_read_remote_write_local(stream) data = stream.get + self.on_print_proc.call(data) if self.on_print_proc user_output.print(data) end # # Read from local and write to remote. # def _stream_read_local_write_remote(stream) data = user_input.gets + self.on_command_proc.call(data) if self.on_command_proc stream.put(data) end # # The local file descriptor handle.