File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
metasploit/framework/command Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 7
7
8
8
# Based on pattern used for lib/rails/commands in the railties gem.
9
9
class Metasploit ::Framework ::Command ::Console < Metasploit ::Framework ::Command ::Base
10
+
11
+ def spinner
12
+ return if $msf_spinner_thread
13
+ $msf_spinner_thread = Thread . new do
14
+ $stderr. print "[*] Starting the Metasploit Framework console..."
15
+ loop do
16
+ %q{/-\|} . each_char do |c |
17
+ $stderr. print c
18
+ $stderr. print "\b "
19
+ end
20
+ end
21
+ end
22
+ end
23
+
10
24
def start
11
25
case parsed_options . options . subcommand
12
26
when :version
13
27
$stderr. puts "Framework Version: #{ Metasploit ::Framework ::VERSION } "
14
28
else
29
+ spinner unless parsed_options . options . console . quiet
15
30
driver . run
16
31
end
17
32
end
Original file line number Diff line number Diff line change @@ -535,6 +535,11 @@ def on_startup(opts = {})
535
535
536
536
framework . events . on_ui_start ( Msf ::Framework ::Revision )
537
537
538
+ if $msf_spinner_thread
539
+ $msf_spinner_thread. kill
540
+ $stderr. print "\n "
541
+ end
542
+
538
543
run_single ( "banner" ) unless opts [ 'DisableBanner' ]
539
544
540
545
opts [ "Plugins" ] . each do |plug |
You can’t perform that action at this time.
0 commit comments