File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
metasploit/framework/command Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,21 @@ def spinner
19
19
return if Rex ::Compat . is_cygwin
20
20
return if $msf_spinner_thread
21
21
$msf_spinner_thread = Thread . new do
22
- $stderr. print "[*] Starting the Metasploit Framework console..."
22
+ base_line = "[*] Starting the Metasploit Framework console..."
23
+ cycle = 0
23
24
loop do
24
25
%q{/-\|} . each_char do |c |
25
- $stderr. print c
26
- $stderr. print "\b "
26
+ status = "#{ base_line } #{ c } \r "
27
+ cycle += 1
28
+ off = cycle % base_line . length
29
+ case status [ off , 1 ]
30
+ when /[a-z]/
31
+ status [ off , 1 ] = status [ off , 1 ] . upcase
32
+ when /[A-Z]/
33
+ status [ off , 1 ] = status [ off , 1 ] . downcase
34
+ end
35
+ $stderr. print status
36
+ ::IO . select ( nil , nil , nil , 0.10 )
27
37
end
28
38
end
29
39
end
Original file line number Diff line number Diff line change @@ -547,7 +547,7 @@ def on_startup(opts = {})
547
547
548
548
if $msf_spinner_thread
549
549
$msf_spinner_thread. kill
550
- $stderr. print "\n "
550
+ $stderr. print "\r " + ( " " * 60 ) + " \ n "
551
551
end
552
552
553
553
run_single ( "banner" ) unless opts [ 'DisableBanner' ]
You can’t perform that action at this time.
0 commit comments