File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
lib/msf/ui/console/command_dispatcher Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1733,13 +1733,16 @@ def cmd_sessions(*args)
1733
1733
end
1734
1734
1735
1735
when 'detach'
1736
- if ( ( session = framework . sessions . get ( sid ) ) )
1737
- print_status ( "Detaching session #{ sid } " )
1738
- if ( session . interactive? )
1739
- session . detach ( )
1736
+ session_list = build_sessions_array ( sid )
1737
+ print_status ( "Detaching the following session(s): #{ session_list . join ( ', ' ) } " )
1738
+ session_list . each do |sess |
1739
+ session = framework . sessions . get ( sess )
1740
+ if session
1741
+ print_status ( "Detaching session #{ sess } " )
1742
+ session . detach
1743
+ else
1744
+ print_error ( "Invalid session identifier: #{ sess } " )
1740
1745
end
1741
- else
1742
- print_error ( "Invalid session identifier: #{ sid } " )
1743
1746
end
1744
1747
1745
1748
when 'interact'
You can’t perform that action at this time.
0 commit comments