Skip to content

Commit eecd05e

Browse files
author
Tod Beardsley
committed
Fix banner language, padding.
1 parent c50c929 commit eecd05e

File tree

1 file changed

+14
-13
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+14
-13
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,19 @@ def cmd_banner_help
384384
def cmd_banner(*args)
385385
banner = "%cya" + Banner.to_s + "%clr\n\n"
386386

387+
# These messages should /not/ show up when you're on a git checkout;
388+
# you're a developer, so you already know all this.
387389
if (is_apt || binary_install)
388390
content = [
389391
"Trouble managing data? List, sort, group, tag and search your pentest data\nin Metasploit Pro -- learn more on http://rapid7.com/metasploit",
390392
"Frustrated with proxy pivoting? Upgrade to layer-2 VPN pivoting with\nMetasploit Pro -- learn more on http://rapid7.com/metasploit",
391393
"Payload caught by AV? Fly under the radar with Dynamic Payloads in\nMetasploit Pro -- learn more on http://rapid7.com/metasploit",
392394
"Easy phishing: Set up email templates, landing pages and listeners\nin Metasploit Pro -- learn more on http://rapid7.com/metasploit",
393395
"Taking notes in notepad? Have Metasploit Pro track & report\nyour progress and findings -- learn more on http://rapid7.com/metasploit",
394-
"Tired of typing 'set RHOSTS'? Click & pwn with Metasploit Pro\n-- learn more on http://rapid7.com/metasploit",
396+
"Tired of typing 'set RHOSTS'? Click & pwn with Metasploit Pro\nLearn more on http://rapid7.com/metasploit",
395397
"Love leveraging credentials? Check out bruteforcing\nin Metasploit Pro -- learn more on http://rapid7.com/metasploit",
396-
"Save 45% of your time on large engagements with Metaspsloit Pro\n-- learn more on http://rapid7.com/metasploit",
397-
"Validate lots of vulnerabilities to demonstrate exposure\nwith Metasploit Pro\n-- learn more on http://rapid7.com/metasploit"
398+
"Save 45% of your time on large engagements with Metaspsloit Pro\nLearn more on http://rapid7.com/metasploit",
399+
"Validate lots of vulnerabilities to demonstrate exposure\nwith Metasploit Pro -- Learn more on http://rapid7.com/metasploit"
398400
]
399401
banner << content.sample # Ruby 1.9-ism!
400402
banner << "\n\n"
@@ -406,19 +408,18 @@ def cmd_banner(*args)
406408
:version => "%yelmetasploit v#{Msf::Framework::Version} [core:#{Msf::Framework::VersionCore} api:#{Msf::Framework::VersionAPI}]%clr",
407409
:exp_aux_pos => "#{framework.stats.num_exploits} exploits - #{framework.stats.num_auxiliary} auxiliary - #{framework.stats.num_post} post",
408410
:pay_enc_nop => "#{framework.stats.num_payloads} payloads - #{framework.stats.num_encoders} encoders - #{framework.stats.num_nops} nops",
409-
:free_trial => "Free Metasploit Pro trial: http://r-7.co/trymsp"
411+
:free_trial => "Free Metasploit Pro trial: http://r-7.co/trymsp",
412+
:padding => 48
410413
}
411414

412-
banner << (" =[ %-56s]\n" % banner_trailers[:version])
413-
banner << ("+ -- --=[ %-48s]\n" % banner_trailers[:exp_aux_pos])
414-
banner << ("+ -- --=[ %-48s]\n" % banner_trailers[:pay_enc_nop])
415+
banner << (" =[ %-#{banner_trailers[:padding]+8}s]\n" % banner_trailers[:version])
416+
banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:exp_aux_pos])
417+
banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:pay_enc_nop])
415418

416-
# Direct the user to the 14-day free trial of Metasploit Pro unless
417-
# they are on an apt install or already using Metasploit Pro,
418-
# Express, or Community edition
419-
unless (is_apt || binary_install)
420-
banner << ("+ -- --=[ %-48s]\n" % banner_trailers[:free_trial])
421-
end
419+
# TODO: People who are already on a Pro install shouldn't see this.
420+
# It's hard for Framework to tell the difference though since
421+
# license details are only in Pro -- we can't see them from here.
422+
banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:free_trial])
422423

423424
if ::Msf::Framework::EICARCorrupted
424425
avdwarn = []

0 commit comments

Comments
 (0)