Skip to content

Commit a5648a8

Browse files
committed
Merge branch 'master' into feature/mdm-module-namespace
Conflicts: Gemfile Gemfile.lock lib/msf/core/db_manager.rb
2 parents 249a09c + 3d5eb24 commit a5648a8

File tree

389 files changed

+5184
-45153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

389 files changed

+5184
-45153
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.bundle
22
# Rubymine project directory
33
.idea
4+
# Portable ruby version files for rvm
5+
.ruby-gemset
6+
.ruby-version
47
# RVM control file
58
.rvmrc
69
# YARD cache directory

.mailmap

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
wchen-r7 <wchen-r7@github> sinn3r <[email protected]> # aka sinn3r
2-
wchen-r7 <wchen-r7@github> Wei Chen <[email protected]>
3-
wchen-r7 <wchen-r7@github> sinn3r <[email protected]>
4-
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
5-
jvazquez-r7 <jvazquez-r7@github> jvazquez-r7 <[email protected]>
1+
bperry-r7 <bperry-r7@github> Brandon Perry <[email protected]>
2+
bperry-r7 <bperry-r7@github> Brandon Perry <bperry@bperry-rapid7.(none)>
3+
bturner-r7 <bturner-r7@github> Brandon Turner <[email protected]>
4+
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]> # aka TheLightCosine
5+
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]>
6+
ecarey-r7 <ecarey-r7@github> Erran Carey <[email protected]>
67
hmoore-r7 <hmoore-r7@github> HD Moore <[email protected]>
78
hmoore-r7 <hmoore-r7@github> HD Moore <[email protected]>
9+
jlee-r7 <jlee-r7@github> James Lee <[email protected]>
810
jlee-r7 <jlee-r7@github> James Lee <[email protected]> # aka egypt
911
jlee-r7 <jlee-r7@github> egypt <[email protected]> # aka egypt
10-
jlee-r7 <jlee-r7@github> James Lee <[email protected]>
11-
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]> # aka TheLightCosine
12-
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]>
1312
joev-r7 <joev-r7@github> Joe Vennix <[email protected]>
14-
bturner-r7 <bturner-r7@github> Brandon Turner <[email protected]>
15-
ecarey-r7 <ecarey-r7@github> Erran Carey <[email protected]>
13+
jvazquez-r7 <jvazquez-r7@github> jvazquez-r7 <[email protected]>
1614
limhoff-r7 <limhoff-r7@github> Luke Imhoff <[email protected]>
17-
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
18-
tasos-r7 <tasos-r7@github> Tasos Laskos <[email protected]>
1915
shuckins-r7 <shuckins-r7@github> Samuel Huckins <[email protected]>
20-
bperry-r7 <bperry-r7@github> Brandon Perry <bperry@bperry-rapid7.(none)>
21-
bperry-r7 <bperry-r7@github> Brandon Perry <[email protected]>
16+
tasos-r7 <tasos-r7@github> Tasos Laskos <[email protected]>
17+
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
18+
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
19+
wchen-r7 <wchen-r7@github> Wei Chen <[email protected]>
20+
wchen-r7 <wchen-r7@github> sinn3r <[email protected]> # aka sinn3r
21+
wchen-r7 <wchen-r7@github> sinn3r <[email protected]>
2222

2323
# Above this line are current Rapid7 employees Below this paragraph are
2424
# volunteers, former employees, and potential Rapid7 employees who, at
@@ -27,43 +27,43 @@ bperry-r7 <bperry-r7@github> Brandon Perry <[email protected]>
2727
# periodically. If you're on this list and would like to not be, just
2828
# let [email protected] know.
2929

30+
ChrisJohnRiley <ChrisJohnRiley@github> Chris John Riley <[email protected]>
31+
ChrisJohnRiley <ChrisJohnRiley@github> Chris John Riley <[email protected]>
32+
FireFart <FireFart@github> Christian Mehlmauer <[email protected]>
33+
Meatballs1 <Meatballs1@github> Ben Campbell <[email protected]>
3034
Meatballs1 <Meatballs1@github> Meatballs <[email protected]>
3135
Meatballs1 <Meatballs1@github> Meatballs1 <[email protected]>
32-
Meatballs1 <Meatballs1@github> Ben Campbell <[email protected]>
33-
jduck <jduck@github> Joshua Drake <[email protected]>
34-
jcran <jcran@github> Jonathan Cran <[email protected]>
35-
jcran <jcran@github> Jonathan Cran <[email protected]>
3636
bannedit <bannedit@github> David Rude <[email protected]>
37-
darkoperator <darkoperator@github> Carlos Perez <[email protected]>
38-
scriptjunkie <scriptjunkie@github> Matt Weeks <[email protected]>
39-
skape <skape@???> Matt Miller <[email protected]>
4037
ceballosm <ceballosm@github> Mario Ceballos <[email protected]>
41-
swtornio <swtornio@github> Steve Tornio <[email protected]>
42-
kris <kris@???> kris <>
43-
spoonm <spoonm@github> Spoon M <[email protected]>
44-
fab <fab@???> fab <> # fab at revhosts.net (Fabrice MOURRON)
38+
corelanc0d3er <corelanc0d3er@github> Peter Van Eeckhoutte (corelanc0d3r) <[email protected]>
39+
corelanc0d3er <corelanc0d3er@github> corelanc0d3r <[email protected]>
40+
darkoperator <darkoperator@github> Carlos Perez <[email protected]>
4541
efraintorres <efraintorres@github> efraintorres <[email protected]>
4642
efraintorres <efraintorres@github> et <>
47-
r3dy <r3dy@github> Royce Davis <[email protected]>
48-
r3dy <r3dy@github> Royce Davis <[email protected]>
43+
fab <fab@???> fab <> # fab at revhosts.net (Fabrice MOURRON)
44+
h0ng10 <h0ng10@github> Hans-Martin Münch <[email protected]>
45+
h0ng10 <h0ng10@github> h0ng10 <[email protected]>
46+
jcran <jcran@github> Jonathan Cran <[email protected]>
47+
jcran <jcran@github> Jonathan Cran <[email protected]>
48+
jduck <jduck@github> Joshua Drake <[email protected]>
49+
jgor <jgor@github> jgor <[email protected]>
50+
kernelsmith <kernelsmith@github> Joshua Smith <[email protected]>
51+
kernelsmith <kernelsmith@github> kernelsmith <kernelsmith@kernelsmith>
52+
kost <kost@github> Vlatko Kosturjak <[email protected]>
53+
kris <kris@???> kris <>
54+
m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
55+
m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
56+
m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
4957
mubix <mubix@github> Rob Fuller <[email protected]>
58+
nevdull77 <nevdull77@github> Patrik Karlsson <[email protected]>
5059
nmonkee <nmonkee@github> nmonkee <[email protected]>
51-
rsmudge <rsmudge@github> Raphael Mudge <[email protected]> # Aka `butane
52-
m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
53-
m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
54-
m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
55-
kost <kost@github> Vlatko Kosturjak <[email protected]>
60+
nullbind <nullbind@github> nullbind <[email protected]>
5661
ohdae <ohdae@github> ohdae <[email protected]>
62+
r3dy <r3dy@github> Royce Davis <[email protected]>
63+
r3dy <r3dy@github> Royce Davis <[email protected]>
64+
rsmudge <rsmudge@github> Raphael Mudge <[email protected]> # Aka `butane
5765
schierlm <schierlm@github> Michael Schierl <[email protected]> # Aka mihi
58-
corelanc0d3er <corelanc0d3er@github> Peter Van Eeckhoutte (corelanc0d3r) <[email protected]>
59-
corelanc0d3er <corelanc0d3er@github> corelanc0d3r <[email protected]>
60-
kernelsmith <kernelsmith@github> Joshua Smith <[email protected]>
61-
kernelsmith <kernelsmith@github> kernelsmith <kernelsmith@kernelsmith>
62-
h0ng10 <h0ng10@github> h0ng10 <[email protected]>
63-
h0ng10 <h0ng10@github> Hans-Martin Münch <[email protected]>
64-
nullbind <nullbind@github> nullbind <[email protected]>
65-
nevdull77 <nevdull77@github> Patrik Karlsson <[email protected]>
66-
jgor <jgor@github> jgor <[email protected]>
67-
ChrisJohnRiley <ChrisJohnRiley@github> Chris John Riley <[email protected]>
68-
ChrisJohnRiley <ChrisJohnRiley@github> Chris John Riley <[email protected]>
69-
FireFart <FireFart@github> Christian Mehlmauer <[email protected]>
66+
scriptjunkie <scriptjunkie@github> Matt Weeks <[email protected]>
67+
skape <skape@???> Matt Miller <[email protected]>
68+
spoonm <spoonm@github> Spoon M <[email protected]>
69+
swtornio <swtornio@github> Steve Tornio <[email protected]>

Gemfile

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,58 @@ source 'http://rubygems.org'
22

33
# Need 3+ for ActiveSupport::Concern
44
gem 'activesupport', '>= 3.0.0'
5-
# Needed for Msf::DbManager
6-
gem 'activerecord'
75
# Needed for some admin modules (scrutinizer_add_user.rb)
86
gem 'json'
9-
# Database models shared between framework and Pro.
10-
gem 'metasploit_data_models', '~> 0.7.1'
117
# Needed by msfgui and other rpc components
128
gem 'msgpack'
139
# Needed by anemone crawler
1410
gem 'nokogiri'
15-
# Needed for module caching in Mdm::Module::Details
16-
gem 'pg', '>= 0.11'
1711
# Needed by anemone crawler
1812
gem 'robots'
19-
# For sniffer and raw socket modules
20-
gem 'pcaprub'
13+
14+
group :db do
15+
# Needed for Msf::DbManager
16+
gem 'activerecord'
17+
# Database models shared between framework and Pro.
18+
gem 'metasploit_data_models', '~> 0.7.1'
19+
# Needed for module caching in Mdm::ModuleDetails
20+
gem 'pg', '>= 0.11'
21+
end
22+
23+
group :pcap do
24+
# For sniffer and raw socket modules
25+
gem 'pcaprub'
26+
end
2127

2228
group :development do
23-
# Markdown formatting for yard
24-
gem 'redcarpet'
25-
# generating documentation
26-
gem 'yard'
29+
# Markdown formatting for yard
30+
gem 'redcarpet'
31+
# generating documentation
32+
gem 'yard'
2733
end
2834

2935
group :development, :test do
3036
# supplies factories for producing model instance for specs
31-
# Version 4.1.0 or newer is needed to support generate calls without the
32-
# 'FactoryGirl.' in factory definitions syntax.
33-
gem 'factory_girl', '>= 4.1.0'
34-
# running documentation generation tasks and rspec tasks
35-
gem 'rake'
37+
# Version 4.1.0 or newer is needed to support generate calls without the
38+
# 'FactoryGirl.' in factory definitions syntax.
39+
gem 'factory_girl', '>= 4.1.0'
40+
# running documentation generation tasks and rspec tasks
41+
gem 'rake'
3642
end
3743

3844
group :test do
3945
# Removes records from database created during tests. Can't use rspec-rails'
4046
# transactional fixtures because multiple connections are in use so
4147
# transactions won't work.
4248
gem 'database_cleaner'
43-
# testing framework
44-
gem 'rspec', '>= 2.12'
45-
# add matchers from shoulda, such as query_the_database, which is useful for
46-
# testing that the Msf::DBManager activation is respected.
47-
gem 'shoulda-matchers'
48-
# code coverage for tests
49-
# any version newer than 0.5.4 gives an Encoding error when trying to read the source files.
50-
gem 'simplecov', '0.5.4', :require => false
49+
# testing framework
50+
gem 'rspec', '>= 2.12'
51+
# add matchers from shoulda, such as query_the_database, which is useful for
52+
# testing that the Msf::DBManager activation is respected.
53+
gem 'shoulda-matchers'
54+
# code coverage for tests
55+
# any version newer than 0.5.4 gives an Encoding error when trying to read the source files.
56+
gem 'simplecov', '0.5.4', :require => false
5157
# Manipulate Time.now in specs
5258
gem 'timecop'
5359
end

LICENSE

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,10 @@ Files: external/ruby-lorcon/*
3232
Copyright: 2005, dragorn and Joshua Wright
3333
License: LGPL-2.1
3434

35-
Files: external/source/armitage/* data/armitage/*
36-
Copyright: 2010-2012 Raphael Mudge
37-
License: BSD-3-clause
38-
3935
Files: external/source/byakugan/*
4036
Copyright: Lurene Grenier, 2009
4137
License: BSD-3-clause
4238

43-
Files: external/source/gui/msfguijava/* data/gui/*
44-
Copyright: 2010 scriptjunkie
45-
License: BSD-3-clause
46-
4739
Files: external/source/ipwn/*
4840
Copyright: 2004-2005 vlad902 <vlad902 [at] gmail.com>
4941
2007 H D Moore <hdm [at] metasploit.com>
@@ -451,7 +443,7 @@ Copyright: 2011 James Miller
451443
License: MIT
452444

453445
Files: lib/windows_console_color_support.rb
454-
Copyright: 2011 Michael 'migi' Schierl
446+
Copyright: 2011 Michael 'mihi' Schierl
455447
License: BSD-3-clause
456448

457449
Files: lib/zip.rb lib/zip/*

Rakefile

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
require 'bundler/setup'
22

3-
require 'metasploit_data_models'
4-
53
pathname = Pathname.new(__FILE__)
64
root = pathname.parent
75

@@ -18,6 +16,8 @@ $LOAD_PATH.unshift(lib_pathname.to_s)
1816
rakefile_glob = root.join('lib', 'tasks', '**', '*.rake').to_path
1917

2018
Dir.glob(rakefile_glob) do |rakefile|
19+
# Skip database tasks, will load them later if MDM is present
20+
next if rakefile =~ /database\.rake$/
2121
load rakefile
2222
end
2323

@@ -36,6 +36,28 @@ else
3636
task :default => :spec
3737
end
3838

39+
begin
40+
require 'metasploit_data_models'
41+
rescue LoadError
42+
puts "metasploit_data_models not in bundle, so can't set up db tasks. " \
43+
"To run database tasks, ensure to install the db bundler group."
44+
45+
print_without = true
46+
else
47+
load 'lib/tasks/database.rake'
48+
metasploit_data_models_task_glob = MetasploitDataModels.root.join(
49+
'lib',
50+
'tasks',
51+
'**',
52+
'*.rake'
53+
).to_s
54+
# include tasks from metasplioit_data_models, such as `rake yard`.
55+
# metasploit-framework specific yard options are in .yardopts
56+
Dir.glob(metasploit_data_models_task_glob) do |path|
57+
load path
58+
end
59+
end
60+
3961
begin
4062
require 'yard'
4163
rescue LoadError
@@ -45,18 +67,6 @@ rescue LoadError
4567
print_without = true
4668
end
4769

48-
metasploit_data_models_task_glob = MetasploitDataModels.root.join(
49-
'lib',
50-
'tasks',
51-
'**',
52-
'*.rake'
53-
).to_s
54-
55-
# include tasks from metasplioit_data_models, such as `rake yard`.
56-
# metasploit-framework specific yard options are in .yardopts
57-
Dir.glob(metasploit_data_models_task_glob) do |path|
58-
load path
59-
end
6070

6171
if print_without
6272
puts "Bundle currently installed " \

armitage

Lines changed: 0 additions & 19 deletions
This file was deleted.

config/database.yml.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Please only use postgresql bound to a TCP port.
2+
# Only postgresql is supportable for metasploit-framework
3+
# these days. (No SQLite, no MySQL).
4+
#
5+
# To set up a metasploit database, follow the directions hosted at:
6+
# https://fedoraproject.org/wiki/Metasploit_Postgres_Setup (Works on
7+
# essentially any Linux distro, not just Fedora)
28
development: &pgsql
39
adapter: postgresql
410
database: metasploit_framework_development
@@ -9,6 +15,12 @@ development: &pgsql
915
pool: 5
1016
timeout: 5
1117

18+
# You will often want to seperate your databases between dev
19+
# mode and prod mode. Absent a production db, though, defaulting
20+
# to dev is pretty sensible for many developer-users.
21+
production: &production
22+
<<: *pgsql
23+
1224
# Warning: The database defined as "test" will be erased and
1325
# re-generated from your development database when you run "rake".
1426
# Do not set this db to the same as development or production.

data/armitage/armitage

Lines changed: 0 additions & 1 deletion
This file was deleted.

data/armitage/armitage-logo.png

-25.4 KB
Binary file not shown.

data/armitage/armitage.jar

-3.07 MB
Binary file not shown.

0 commit comments

Comments
 (0)