Skip to content

Commit

Permalink
Land rapid7#9259, make master Metasploit 5 dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
busterb committed Jan 18, 2018
2 parents d6e966b + 06459e2 commit add907e
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 25 deletions.
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
metasploit-framework (4.16.32)
metasploit-framework (5.0.0)
actionpack (~> 4.2.6)
activerecord (~> 4.2.6)
activesupport (~> 4.2.6)
Expand Down Expand Up @@ -182,13 +182,13 @@ GEM
activesupport (~> 4.2.6)
railties (~> 4.2.6)
metasploit-payloads (1.3.25)
metasploit_data_models (2.0.15)
metasploit_data_models (2.0.16)
activerecord (~> 4.2.6)
activesupport (~> 4.2.6)
arel-helpers
metasploit-concern
metasploit-model
pg
pg (= 0.20.0)
postgres_ext
railties (~> 4.2.6)
recog (~> 2.0)
Expand All @@ -203,7 +203,7 @@ GEM
nessus_rest (0.1.6)
net-ssh (4.2.0)
network_interface (0.0.2)
nexpose (7.1.1)
nexpose (7.2.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
octokit (4.8.0)
Expand Down
25 changes: 25 additions & 0 deletions data/logos/under-construction-v5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
%clr%red .;lxO0KXXXK0Oxl:.
,o0WMMMMMMMMMMMMMMMMMMKd,
'xNMMMMMMMMMMMMMMMMMMMMMMMMMWx,
:KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK:
.KMMMMMMMMMMMMMMMWNNNWMMMMMMMMMMMMMMMX,
lWMMMMMMMMMMMXd:.. ..;dKMMMMMMMMMMMMo
xMMMMMMMMMMWd. .oNMMMMMMMMMMk
oMMMMMMMMMMx. dMMMMMMMMMMx
.WMMMMMMMMM: :MMMMMMMMMM,
xMMMMMMMMMo lMMMMMMMMMO
NMMMMMMMMW ,cccccoMMMMMMMMMWlccccc;
MMMMMMMMMX ;KMMMMMMMMMMMMMMMMMMX:
NMMMMMMMMW. ;KMMMMMMMMMMMMMMX:
xMMMMMMMMMd ,0MMMMMMMMMMK;
.WMMMMMMMMMc 'OMMMMMM0,
lMMMMMMMMMMk. .kMMO'
dMMMMMMMMMMWd' ..
cWMMMMMMMMMMMNxc'.%clr%whi ##########%clr
%red .0MMMMMMMMMMMMMMMMWc%clr%whi #+# #+#%clr
%red ;0MMMMMMMMMMMMMMMo.%clr%whi +:+%clr
%red .dNMMMMMMMMMMMMo%clr +%whi#+%clr+:++#+
%red 'oOWMMMMMMMMo%clr +:+
%red .,cdkO0K;%clr :+: :+:
:::::::+:
%whiMetasploit%clr %yelUnder Construction%clr
2 changes: 1 addition & 1 deletion lib/metasploit/framework/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.get_hash
end
end

VERSION = "4.16.32"
VERSION = "5.0.0"
MAJOR, MINOR, PATCH = VERSION.split('.').map { |x| x.to_i }
PRERELEASE = 'dev'
HASH = get_hash
Expand Down
10 changes: 7 additions & 3 deletions lib/msf/base/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,24 @@ def self.get_config_root
return val
end

# XXX Update this when there is a need to break compatibility
config_dir_major = 4
config_dir = ".msf#{config_dir_major}"

# Windows-specific environment variables
['HOME', 'LOCALAPPDATA', 'APPDATA', 'USERPROFILE'].each do |dir|
val = Rex::Compat.getenv(dir)
if (val and File.directory?(val))
return File.join(val, ".msf#{Metasploit::Framework::Version::MAJOR}")
return File.join(val, config_dir)
end
end

begin
# First we try $HOME/.msfx
File.expand_path("~#{FileSep}.msf#{Metasploit::Framework::Version::MAJOR}")
File.expand_path("~#{FileSep}#{config_dir}")
rescue ::ArgumentError
# Give up and install root + ".msfx"
InstallRoot + ".msf#{Metasploit::Framework::Version::MAJOR}"
InstallRoot + config_dir
end
end

Expand Down
27 changes: 11 additions & 16 deletions lib/msf/ui/console/command_dispatcher/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,22 +231,17 @@ def cmd_banner(*args)

avdwarn = nil

banner_trailers = {
:version => "%yelmetasploit v#{Metasploit::Framework::VERSION}%clr",
:exp_aux_pos => "#{framework.stats.num_exploits} exploits - #{framework.stats.num_auxiliary} auxiliary - #{framework.stats.num_post} post",
:pay_enc_nop => "#{framework.stats.num_payloads} payloads - #{framework.stats.num_encoders} encoders - #{framework.stats.num_nops} nops",
:free_trial => "Free Metasploit Pro trial: http://r-7.co/trymsp",
:padding => 48
}

banner << (" =[ %-#{banner_trailers[:padding]+8}s]\n" % banner_trailers[:version])
banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:exp_aux_pos])
banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:pay_enc_nop])

# TODO: People who are already on a Pro install shouldn't see this.
# It's hard for Framework to tell the difference though since
# license details are only in Pro -- we can't see them from here.
banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:free_trial])
stats = framework.stats
version = "%yelmetasploit v#{Metasploit::Framework::VERSION}%clr",
exp_aux_pos = "#{stats.num_exploits} exploits - #{stats.num_auxiliary} auxiliary - #{stats.num_post} post",
pay_enc_nop = "#{stats.num_payloads} payloads - #{stats.num_encoders} encoders - #{stats.num_nops} nops",
dev_note = "** This is Metasploit 5 development branch **"
padding = 48

banner << (" =[ %-#{padding+8}s]\n" % version)
banner << ("+ -- --=[ %-#{padding}s]\n" % exp_aux_pos)
banner << ("+ -- --=[ %-#{padding}s]\n" % pay_enc_nop)
banner << ("+ -- --=[ %-#{padding}s]\n" % dev_note)

if ::Msf::Framework::EICARCorrupted
avdwarn = []
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/ui/console/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Driver < Msf::Ui::Driver
ConfigCore = "framework/core"
ConfigGroup = "framework/ui/console"

DefaultPrompt = "%undmsf%clr"
DefaultPrompt = "%undmsf5%clr"
DefaultPromptChar = "%clr>"

#
Expand Down

0 comments on commit add907e

Please sign in to comment.