File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -474,12 +474,9 @@ def unknown_command(method, line)
474474 [ method , method +".exe" ] . each do |cmd |
475475 if command_passthru && Rex ::FileUtils . find_full_path ( cmd )
476476
477- print_status ( "exec: #{ line } " )
478- print_line ( '' )
479-
480477 self . busy = true
481478 begin
482- system ( line )
479+ run_unknown_command ( line )
483480 rescue ::Errno ::EACCES , ::Errno ::ENOENT
484481 print_error ( "Permission denied exec: #{ line } " )
485482 end
@@ -500,6 +497,12 @@ def unknown_command(method, line)
500497 super
501498 end
502499
500+ def run_unknown_command ( command )
501+ print_status ( "exec: #{ command } " )
502+ print_line ( '' )
503+ system ( command )
504+ end
505+
503506 ##
504507 #
505508 # Handlers for various global configuration values
Original file line number Diff line number Diff line change @@ -32,6 +32,15 @@ module WebConsoleShell
3232 def supports_color?
3333 false
3434 end
35+
36+ def run_unknown_command ( command )
37+ Open3 . popen2e ( command ) { |stdin , output , thread |
38+ output . each { |outline |
39+ print_line ( outline . chomp )
40+ }
41+ }
42+ end
43+
3544 end
3645
3746 def initialize ( framework , console_id , opts = { } )
You can’t perform that action at this time.
0 commit comments