Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to add to or change the ASCII art that gets displayed on startup in Metasploit.

Where is/are the file(s) I need to edit to do this, and what is the syntax? How can I include color in the art? Does it support Unicode characters?

share|improve this question
up vote 3 down vote accepted

The banners are defined in the ruby source code, in msf/lib/msf/ui/banner.rb. They're simple Ruby strings, delimited usually by single quotes or %Q{/} if formatting placeholders are used. Between these strings, there's just a comma. Just add one to the array, they are chosen by random (at the end of the file).

You should adhere to Ruby string rules (don't put ' in there if you use them as delimiters, for example). Ruby apparently has some unicode issues, but the Ruby docs will probably tell you more about this.

Metasploit banners support the colors and formatting (bold, underline) defined in msf/lib/rex/ui/text/color.rb — basically the regular 16 or so terminal colors.

share|improve this answer
Clearly more of an RTFSC - Read The Fine Source Code :-) – Daniel Beck Nov 12 '11 at 18:16
Thanks. I'm having a hard time figuring out what the delimiter is between art works. Also, are there any characters I should exclude from the "images"? – Iszi Nov 12 '11 at 18:26
@Iszi I added a bit to my answer. Remember, you're programming Ruby if you're editing these files, so jut consult the Ruby docs if you get stuck. – Daniel Beck Nov 12 '11 at 18:37

Metasploit will parse it and output the color... it removes spaces and can mess up your spacing.

variable = "%cyn" + "Make me cyan color!!!" + "%clr"


Referenced here

str.gsub!(/%cya/, pre_color+colorize('cyan')+post_color)
str.gsub!(/%red/, pre_color+colorize('red')+post_color)
str.gsub!(/%grn/, pre_color+colorize('green')+post_color)
str.gsub!(/%blu/, pre_color+colorize('blue')+post_color)
str.gsub!(/%yel/, pre_color+colorize('yellow')+post_color)
str.gsub!(/%whi/, pre_color+colorize('white')+post_color)
str.gsub!(/%mag/, pre_color+colorize('magenta')+post_color)
str.gsub!(/%blk/, pre_color+colorize('black')+post_color)
str.gsub!(/%dred/, pre_color+colorize('dark', 'red')+post_color)
str.gsub!(/%dgrn/, pre_color+colorize('dark', 'green')+post_color)
str.gsub!(/%dblu/, pre_color+colorize('dark', 'blue')+post_color)
str.gsub!(/%dyel/, pre_color+colorize('dark', 'yellow')+post_color)
str.gsub!(/%dcya/, pre_color+colorize('dark', 'cyan')+post_color)
str.gsub!(/%dwhi/, pre_color+colorize('dark', 'white')+post_color)
str.gsub!(/%dmag/, pre_color+colorize('dark', 'magenta')+post_color)
str.gsub!(/%und/, pre_color+colorize('underline')+post_color)
str.gsub!(/%bld/, pre_color+colorize('bold')+post_color)
str.gsub!(/%clr/, pre_color+colorize('clear')+post_color)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.