Skip to content

Commit cd1e61a

Browse files
committed
Merge branch 'master' into bmc_trackit
2 parents 54e8254 + b1453af commit cd1e61a

File tree

3,340 files changed

+46060
-31848
lines changed

Some content is hidden

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

3,340 files changed

+46060
-31848
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ Gemfile.local.lock
77
.sublime-project
88
# RVM control file, keep this to avoid backdooring Metasploit
99
.rvmrc
10+
# Allow for a local choice of (unsupported / semi-supported) ruby versions
11+
# See PR #4136 for usage, but example usage for rvm:
12+
# rvm --create --versions-conf use 2.1.4@metasploit-framework
13+
# Because rbenv doesn't use .versions.conf, to achieve this same functionality, run:
14+
# rbenv shell 2.1.4
15+
.versions.conf
1016
# YARD cache directory
1117
.yardoc
1218
# Mac OS X files
@@ -77,3 +83,7 @@ data/meterpreter/screenshot.*.dll
7783
# private source. If you're interested in this functionality,
7884
# check out Metasploit Pro: http://metasploit.com/download
7985
data/meterpreter/ext_server_pivot.*.dll
86+
87+
# Avoid checking in metakitty, the source for
88+
# https://rapid7.github.io/metasploit-framework. It's an orphan branch.
89+
/metakitty

.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
--color
22
--format Fivemat
3+
--require spec_helper

.rubocop.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# inherit_from: .rubocop_todo.yml
1010

11-
Style/ClassLength:
11+
Metrics/ClassLength:
1212
Description: 'Most Metasploit modules are quite large. This is ok.'
1313
Enabled: true
1414
Exclude:
@@ -25,14 +25,14 @@ Style/Encoding:
2525
Description: 'We prefer binary to UTF-8.'
2626
EnforcedStyle: 'when_needed'
2727

28-
Style/LineLength:
28+
Metrics/LineLength:
2929
Description: >-
3030
Metasploit modules often pattern match against very
3131
long strings when identifying targets.
3232
Enabled: true
3333
Max: 180
3434

35-
Style/MethodLength:
35+
Metrics/MethodLength:
3636
Enabled: true
3737
Description: >-
3838
While the style guide suggests 10 lines, exploit definitions
@@ -44,6 +44,11 @@ Style/MethodLength:
4444
Style/Encoding:
4545
Enabled: false
4646

47+
# %q() is super useful for long strings split over multiple lines and
48+
# is very common in module constructors for things like descriptions
49+
Style/UnneededPercentQ:
50+
Enabled: false
51+
4752
Style/NumericLiterals:
4853
Enabled: false
4954
Description: 'This often hurts readability for exploit-ish code.'

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.3-p547
1+
1.9.3-p551

.travis.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
env:
22
- RAKE_TASK=cucumber
3-
- RAKE_TASK=cucumber:boot
4-
- RAKE_TASK=spec
3+
# Commenting out the boot tests due to chronic timeouts.
4+
# - RAKE_TASK=cucumber:boot
5+
- RAKE_TASK=spec SPEC_OPTS="--tag content"
6+
- RAKE_TASK=spec SPEC_OPTS="--tag ~content"
57

68
language: ruby
9+
matrix:
10+
fast_finish: true
711
before_install:
812
- rake --version
913
- sudo apt-get update -qq
@@ -19,14 +23,22 @@ before_script:
1923
- bundle exec rake --version
2024
- bundle exec rake db:create
2125
- bundle exec rake db:migrate
22-
script: "bundle exec rake $RAKE_TASK"
26+
script:
27+
# fail build if db/schema.rb update is not committed
28+
- git diff --exit-code && bundle exec rake $RAKE_TASK
2329

2430
rvm:
25-
#- '1.8.7'
2631
- '1.9.3'
32+
- '2.1'
2733

2834
notifications:
2935
irc: "irc.freenode.org#msfnotify"
3036

3137
git:
3238
depth: 5
39+
40+
# Blacklist certain branches from triggering travis builds
41+
branches:
42+
except:
43+
- gh-pages
44+
- metakitty

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-f
3737
## Code Contributions
3838

3939
* **Do** stick to the [Ruby style guide](https://github.com/bbatsov/ruby-style-guide).
40-
* *Do* get [Rubocop](https://rubygems.org/search?query=rubocop) relatively quiet against the code you are adding or modifying.
40+
* **Do** get [Rubocop](https://rubygems.org/search?query=rubocop) relatively quiet against the code you are adding or modifying.
4141
* **Do** follow the [50/72 rule](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for Git commit messages.
42+
* **Don't** use the default merge messages when merging from other
43+
branches.
4244
* **Do** create a [topic branch](http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches) to work on instead of working directly on `master`.
4345

4446
### Pull Requests

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2006-2013, Rapid7, Inc.
1+
Copyright (C) 2006-2014, Rapid7, Inc.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

Gemfile

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
source 'https://rubygems.org'
22
# Add default group gems to `metasploit-framework.gemspec`:
33
# spec.add_runtime_dependency '<name>', [<version requirements>]
4-
gemspec
4+
gemspec name: 'metasploit-framework'
55

66
group :db do
7-
# Needed for Msf::DbManager
8-
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
9-
10-
# Metasploit::Credential database models
11-
gem 'metasploit-credential', '~> 0.12.0'
12-
# Database models shared between framework and Pro.
13-
gem 'metasploit_data_models', '~> 0.21.1'
14-
# Needed for module caching in Mdm::ModuleDetails
15-
gem 'pg', '>= 0.11'
7+
gemspec name: 'metasploit-framework-db'
168
end
179

1810
group :development do
@@ -43,9 +35,7 @@ group :development, :test do
4335
end
4436

4537
group :pcap do
46-
gem 'network_interface', '~> 0.0.1'
47-
# For sniffer and raw socket modules
48-
gem 'pcaprub'
38+
gemspec name: 'metasploit-framework-pcap'
4939
end
5040

5141
group :test do

Gemfile.lock

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,27 @@ PATH
99
json
1010
metasploit-concern (~> 0.3.0)
1111
metasploit-model (~> 0.28.0)
12-
meterpreter_bins (= 0.0.7)
12+
meterpreter_bins (= 0.0.12)
1313
msgpack
1414
nokogiri
1515
packetfu (= 1.1.9)
1616
railties
17+
rb-readline
1718
recog (~> 1.0)
1819
robots
1920
rubyzip (~> 1.1)
2021
sqlite3
2122
tzinfo
23+
metasploit-framework-db (4.10.1.pre.dev)
24+
activerecord (< 4.0.0)
25+
metasploit-credential (~> 0.13.7)
26+
metasploit-framework (= 4.10.1.pre.dev)
27+
metasploit_data_models (~> 0.21.1)
28+
pg (>= 0.11)
29+
metasploit-framework-pcap (4.10.1.pre.dev)
30+
metasploit-framework (= 4.10.1.pre.dev)
31+
network_interface (~> 0.0.1)
32+
pcaprub
2233

2334
GEM
2435
remote: https://rubygems.org/
@@ -51,13 +62,13 @@ GEM
5162
i18n (~> 0.6, >= 0.6.4)
5263
multi_json (~> 1.0)
5364
arel (3.0.3)
54-
arel-helpers (2.0.1)
65+
arel-helpers (2.0.2)
5566
activerecord (>= 3.1.0, < 5)
5667
aruba (0.6.1)
5768
childprocess (>= 0.3.6)
5869
cucumber (>= 1.1.1)
5970
rspec-expectations (>= 2.7.0)
60-
bcrypt (3.1.7)
71+
bcrypt (3.1.9)
6172
builder (3.0.4)
6273
capybara (2.4.1)
6374
mime-types (>= 1.16)
@@ -101,7 +112,7 @@ GEM
101112
metasploit-concern (0.3.0)
102113
activesupport (~> 3.0, >= 3.0.0)
103114
railties (< 4.0.0)
104-
metasploit-credential (0.12.0)
115+
metasploit-credential (0.13.7)
105116
metasploit-concern (~> 0.3.0)
106117
metasploit-model (~> 0.28.0)
107118
metasploit_data_models (~> 0.21.0)
@@ -112,7 +123,7 @@ GEM
112123
metasploit-model (0.28.0)
113124
activesupport
114125
railties (< 4.0.0)
115-
metasploit_data_models (0.21.1)
126+
metasploit_data_models (0.21.2)
116127
activerecord (>= 3.2.13, < 4.0.0)
117128
activesupport
118129
arel-helpers
@@ -121,15 +132,15 @@ GEM
121132
pg
122133
railties (< 4.0.0)
123134
recog (~> 1.0)
124-
meterpreter_bins (0.0.7)
135+
meterpreter_bins (0.0.12)
125136
method_source (0.8.2)
126137
mime-types (1.25.1)
127-
mini_portile (0.6.0)
128-
msgpack (0.5.8)
138+
mini_portile (0.6.1)
139+
msgpack (0.5.9)
129140
multi_json (1.0.4)
130141
network_interface (0.0.1)
131-
nokogiri (1.6.3.1)
132-
mini_portile (= 0.6.0)
142+
nokogiri (1.6.5)
143+
mini_portile (~> 0.6.0)
133144
packetfu (1.1.9)
134145
pcaprub (0.11.3)
135146
pg (0.17.1)
@@ -160,10 +171,11 @@ GEM
160171
rake (>= 0.8.7)
161172
rdoc (~> 3.4)
162173
thor (>= 0.14.6, < 2.0)
163-
rake (10.3.2)
174+
rake (10.4.2)
175+
rb-readline (0.5.1)
164176
rdoc (3.12.2)
165177
json (~> 1.4)
166-
recog (1.0.0)
178+
recog (1.0.6)
167179
nokogiri
168180
redcarpet (3.1.2)
169181
rkelly-remix (0.0.6)
@@ -195,19 +207,19 @@ GEM
195207
simplecov-html (~> 0.5.3)
196208
simplecov-html (0.5.3)
197209
slop (3.6.0)
198-
sprockets (2.2.2)
210+
sprockets (2.2.3)
199211
hike (~> 1.2)
200212
multi_json (~> 1.0)
201213
rack (~> 1.0)
202214
tilt (~> 1.1, != 1.3.0)
203-
sqlite3 (1.3.9)
215+
sqlite3 (1.3.10)
204216
thor (0.19.1)
205217
tilt (1.4.1)
206218
timecop (0.7.1)
207219
treetop (1.4.15)
208220
polyglot
209221
polyglot (>= 0.3.1)
210-
tzinfo (0.3.41)
222+
tzinfo (0.3.42)
211223
xpath (2.0.0)
212224
nokogiri (~> 1.3)
213225
yard (0.8.7.4)
@@ -216,18 +228,14 @@ PLATFORMS
216228
ruby
217229

218230
DEPENDENCIES
219-
activerecord (>= 3.0.0, < 4.0.0)
220231
aruba
221232
cucumber-rails
222233
factory_girl (>= 4.1.0)
223234
factory_girl_rails
224235
fivemat (= 1.2.1)
225-
metasploit-credential (~> 0.12.0)
226236
metasploit-framework!
227-
metasploit_data_models (~> 0.21.1)
228-
network_interface (~> 0.0.1)
229-
pcaprub
230-
pg (>= 0.11)
237+
metasploit-framework-db!
238+
metasploit-framework-pcap!
231239
pry
232240
rake (>= 10.0.0)
233241
redcarpet

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env rake
22
require File.expand_path('../config/application', __FILE__)
33
require 'metasploit/framework/require'
4+
require 'metasploit/framework/spec/untested_payloads'
45

56
# @note must be before `Metasploit::Framework::Application.load_tasks`
67
#
@@ -9,3 +10,6 @@ require 'metasploit/framework/require'
910
Metasploit::Framework::Require.optionally_active_record_railtie
1011

1112
Metasploit::Framework::Application.load_tasks
13+
Metasploit::Framework::Spec::Constants.define_task
14+
Metasploit::Framework::Spec::Threads::Suite.define_task
15+
Metasploit::Framework::Spec::UntestedPayloads.define_task

0 commit comments

Comments
 (0)