Skip to content

Commit af24e03

Browse files
committed
Update from upstream
2 parents 7db7b4d + 6613745 commit af24e03

File tree

3,666 files changed

+67922
-37353
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,666 files changed

+67922
-37353
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ 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
1319
.DS_Store
1420
# database config for testing
1521
config/database.yml
22+
# target config file for testing
23+
features/support/targets.yml
1624
# simplecov coverage data
1725
coverage
1826
doc/
@@ -50,6 +58,8 @@ tags
5058

5159
# Rails log directory
5260
/log
61+
# Rails tmp directory
62+
/tmp
5363

5464
# ignore release/debug folders for exploits
5565
external/source/exploits/**/Debug
@@ -73,3 +83,7 @@ data/meterpreter/screenshot.*.dll
7383
# private source. If you're interested in this functionality,
7484
# check out Metasploit Pro: http://metasploit.com/download
7585
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

.mailmap

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
1+
bcook-r7 <bcook-r7@github> Brent Cook <[email protected]>
12
bturner-r7 <bturner-r7@github> Brandon Turner <[email protected]>
3+
dheiland-r7 <dheiland-r7@github> Deral Heiland <[email protected]>
4+
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]>
25
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]>
3-
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]> # aka TheLightCosine
6+
dmaloney-r7 <dmaloney-r7@github> dmaloney-r7 <[email protected]>
47
ecarey-r7 <ecarey-r7@github> Erran Carey <[email protected]>
58
farias-r7 <farias-r7@github> Fernando Arias <[email protected]>
69
hmoore-r7 <hmoore-r7@github> HD Moore <[email protected]>
710
hmoore-r7 <hmoore-r7@github> HD Moore <[email protected]>
8-
jlee-r7 <jlee-r7@github> egypt <[email protected]> # aka egypt
9-
jlee-r7 <jlee-r7@github> James Lee <[email protected]> # aka egypt
11+
jhart-r7 <jhart-r7@github> Jon Hart <[email protected]>
1012
jlee-r7 <jlee-r7@github> James Lee <[email protected]>
11-
joev-r7 <joev-r7@github> joev <[email protected]>
13+
jlee-r7 <jlee-r7@github> James Lee <[email protected]> # aka egypt
14+
jlee-r7 <jlee-r7@github> egypt <[email protected]> # aka egypt
1215
joev-r7 <joev-r7@github> Joe Vennix <[email protected]>
16+
joev-r7 <joev-r7@github> joev <[email protected]>
1317
jvazquez-r7 <jvazquez-r7@github> jvazquez-r7 <[email protected]>
1418
jvazquez-r7 <jvazquez-r7@github> jvazquez-r7 <[email protected]>
1519
limhoff-r7 <limhoff-r7@github> Luke Imhoff <[email protected]>
20+
lsanchez-r7 <lsanchez-r7@github> Lance Sanchez <[email protected]>
21+
lsanchez-r7 <lsanchez-r7@github> darkbushido <[email protected]>
22+
mbuck-r7 <mbuck-r7@github> Matt Buck <[email protected]>
23+
mbuck-r7 <mbuck-r7@github> Matt Buck <[email protected]>
24+
parzamendi-r7 <parzamendi-r7@github> parzamendi-r7 <[email protected]>
1625
shuckins-r7 <shuckins-r7@github> Samuel Huckins <[email protected]>
1726
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
1827
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
1928
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
2029
trosen-r7 <trosen-r7@github> Trevor Rosen <[email protected]>
2130
trosen-r7 <trosen-r7@github> Trevor Rosen <[email protected]>
31+
wchen-r7 <wchen-r7@github> Wei Chen <[email protected]>
2232
wchen-r7 <wchen-r7@github> sinn3r <[email protected]> # aka sinn3r
2333
wchen-r7 <wchen-r7@github> sinn3r <[email protected]>
24-
wchen-r7 <wchen-r7@github> Wei Chen <[email protected]>
2534
wvu-r7 <wvu-r7@github> William Vu <[email protected]>
2635
wvu-r7 <wvu-r7@github> William Vu <[email protected]>
2736
wvu-r7 <wvu-r7@github> William Vu <[email protected]>
37+
wvu-r7 <wvu-r7@github> wvu-r7 <[email protected]>
2838

2939
# Above this line are current Rapid7 employees. Below this paragraph are
3040
# volunteers, former employees, and potential Rapid7 employees who, at
@@ -66,25 +76,29 @@ m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
6676
m-1-k-3 <m-1-k-3@github> m-1-k-3 <[email protected]>
6777
Meatballs1 <Meatballs1@github> Ben Campbell <[email protected]>
6878
Meatballs1 <Meatballs1@github> Meatballs <[email protected]>
69-
Meatballs1 <Meatballs1@github> Meatballs1 <[email protected]>
79+
Meatballs1 <Meatballs1@github> Meatballs1 <[email protected]>
7080
mubix <mubix@github> Rob Fuller <[email protected]>
7181
nevdull77 <nevdull77@github> Patrik Karlsson <[email protected]>
72-
nmonkee <nmonkee@github> nmonkee <[email protected]>
82+
nmonkee <nmonkee@github> nmonkee <[email protected]>
7383
nullbind <nullbind@github> nullbind <[email protected]>
84+
nullbind <nullbind@github> Scott Sutherland <[email protected]>
7485
ohdae <ohdae@github> ohdae <[email protected]>
75-
OJ <oj@github> OJ Reeves <[email protected]>
7686
OJ <oj@github> OJ <[email protected]>
87+
OJ <oj@github> OJ Reeves <[email protected]>
7788
r3dy <r3dy@github> Royce Davis <[email protected]>
7889
r3dy <r3dy@github> Royce Davis <[email protected]>
7990
Rick Flores <[email protected]> Rick Flores (nanotechz9l) <[email protected]>
8091
rsmudge <rsmudge@github> Raphael Mudge <[email protected]> # Aka `butane
8192
schierlm <schierlm@github> Michael Schierl <[email protected]> # Aka mihi
8293
scriptjunkie <scriptjunkie@github> Matt Weeks <[email protected]>
94+
scriptjunkie <scriptjunkie@github> scriptjunkie <[email protected]>
8395
skape <skape@???> Matt Miller <[email protected]>
8496
spoonm <spoonm@github> Spoon M <[email protected]>
8597
swtornio <swtornio@github> Steve Tornio <[email protected]>
8698
Tasos Laskos <[email protected]> Tasos Laskos <[email protected]>
99+
timwr <timwr@github> Tim Wright <[email protected]>
87100
TrustedSec <[email protected]> trustedsec <[email protected]>
101+
zeroSteiner <zeroSteiner@github> Spencer McIntyre <[email protected]>
88102

89103
# Aliases for utility author names. Since they're fake, typos abound
90104

.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: 32 additions & 4 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,20 +25,30 @@ 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
3939
often exceed 200 lines.
4040
Max: 300
4141

42+
# Basically everything in metasploit needs binary encoding, not UTF-8.
43+
# Disable this here and enforce it through msftidy
44+
Style/Encoding:
45+
Enabled: false
46+
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+
4252
Style/NumericLiterals:
4353
Enabled: false
4454
Description: 'This often hurts readability for exploit-ish code.'
@@ -53,4 +63,22 @@ Style/StringLiterals:
5363

5464
Style/WordArray:
5565
Enabled: false
56-
Description: 'Metasploit prefers consistent use of []'
66+
Description: 'Metasploit prefers consistent use of []'
67+
68+
Style/RedundantBegin:
69+
Exclude:
70+
# this pattern is very common and somewhat unavoidable
71+
# def run_host(ip)
72+
# begin
73+
# ...
74+
# rescue ...
75+
# ...
76+
# ensure
77+
# disconnect
78+
# end
79+
# end
80+
- 'modules/**/*'
81+
82+
Documentation:
83+
Exclude:
84+
- 'modules/**/*'

.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

.simplecov

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ SimpleCov.configure do
3939
# Other library groups
4040
#
4141

42-
add_group 'Fastlib', 'lib/fastlib'
4342
add_group 'Metasm', 'lib/metasm'
4443
add_group 'PacketFu', 'lib/packetfu'
4544
add_group 'Rex', 'lib/rex'

.travis.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
bundler_args: --without development coverage
2+
env:
3+
- RAKE_TASKS="cucumber cucumber:boot"
4+
- RAKE_TASKS=spec SPEC_OPTS="--tag content"
5+
- RAKE_TASKS=spec SPEC_OPTS="--tag ~content"
6+
17
language: ruby
8+
matrix:
9+
fast_finish: true
210
before_install:
11+
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
312
- rake --version
413
- sudo apt-get update -qq
514
- sudo apt-get install -qq libpcap-dev
615
# Uncomment when we have fewer shipping msftidy warnings.
716
# Merge committers will still be checking, just not autofailing.
8-
# See https://dev.metasploit.com/redmine/issues/8498
917
# - ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
1018
# - ls -la ./.git/hooks
1119
# - ./.git/hooks/post-merge
@@ -14,13 +22,22 @@ before_script:
1422
- bundle exec rake --version
1523
- bundle exec rake db:create
1624
- bundle exec rake db:migrate
25+
script:
26+
# fail build if db/schema.rb update is not committed
27+
- git diff --exit-code && bundle exec rake $RAKE_TASKS
1728

1829
rvm:
19-
#- '1.8.7'
2030
- '1.9.3'
31+
- '2.1'
2132

2233
notifications:
2334
irc: "irc.freenode.org#msfnotify"
2435

2536
git:
2637
depth: 5
38+
39+
# Blacklist certain branches from triggering travis builds
40+
branches:
41+
except:
42+
- gh-pages
43+
- metakitty

CONTRIBUTING.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
Thanks for your interest in making Metasploit -- and therefore, the
44
world -- a better place!
55

6-
Are you about to report a bug? If so, please use our [Redmine Bug
7-
Tracker](https://dev.metasploit.com/redmine/projects/framework). An
8-
account is required but it only takes a minute or two.
6+
Are you about to report a bug? Sorry to hear it.
97

10-
Are you about to report a security vulnerability in Metasploit?
11-
If so, please take a look at Rapid's [Vulnerability
12-
Disclosure Policy](https://www.rapid7.com/disclosure.jsp) policy.
8+
Here's our [Issue tracker](https://github.com/rapid7/metasploit-framework/issues).
9+
Please try to be as specific as you can about your problem, include steps
10+
to reproduce (cut and paste from your console output if it's helpful), and
11+
what you were expecting to happen.
12+
13+
Are you about to report a security vulnerability in Metasploit itself?
14+
How ironic! Please take a look at Rapid7's [Vulnerability
15+
Disclosure Policy](https://www.rapid7.com/disclosure.jsp), and send
16+
your report to [email protected] using [our PGP key](http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x2380F85B8AD4DB8D).
1317

1418
Are you about to contribute some new functionality, a bug fix, or a new
1519
Metasploit module? If so, read on...
@@ -33,8 +37,10 @@ and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-f
3337
## Code Contributions
3438

3539
* **Do** stick to the [Ruby style guide](https://github.com/bbatsov/ruby-style-guide).
36-
* *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.
3741
* **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.
3844
* **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`.
3945

4046
### Pull Requests
@@ -51,7 +57,7 @@ Pull requests [#2940](https://github.com/rapid7/metasploit-framework/pull/2940)
5157
#### New Modules
5258

5359
* **Do** run `tools/msftidy.rb` against your module and fix any errors or warnings that come up. Even better would be to set up `msftidy.rb` as a [pre-commit hook](https://github.com/rapid7/metasploit-framework/blob/master/tools/dev/pre-commit-hook.rb).
54-
* **Do** use the [many module mixin APIs](https://dev.metasploit.com/api/). Wheel improvements are welcome; wheel reinventions, not so much.
60+
* **Do** use the [many module mixin APIs](https://rapid7.github.io/metasploit-framework/api/). Wheel improvements are welcome; wheel reinventions, not so much.
5561
* **Don't** include more than one module per pull request.
5662

5763
#### Library Code
@@ -64,18 +70,14 @@ Pull requests [#2940](https://github.com/rapid7/metasploit-framework/pull/2940)
6470
#### Bug Fixes
6571

6672
* **Do** include reproduction steps in the form of verification steps.
67-
* **Do** include a link to the corresponding [Redmine](https://dev.metasploit.com/redmine/projects/framework) issue in the format of `SeeRM #1234` in your commit description.
73+
* **Do** include a link to any corresponding [Issue](https://github.com/rapid7/metasploit-framework/issues) in the format of `See #1234` in your commit description.
6874

6975
## Bug Reports
7076

7177
* **Do** report vulnerabilities in Rapid7 software directly to [email protected].
72-
* **Do** create a Redmine account and report your non-vulnerability bugs there.
7378
* **Do** write a detailed description of your bug and use a descriptive title.
7479
* **Do** include reproduction steps, stack traces, and anything else that might help us verify and fix your bug.
7580
* **Don't** file duplicate reports - search for your bug before filing a new report.
76-
* **Don't** report a bug on GitHub. Use [Redmine](https://dev.metasploit.com/redmine/projects/framework) instead.
77-
78-
Redmine issues [#8762](https://dev.metasploit.com/redmine/issues/8762) and [#8764](https://dev.metasploit.com/redmine/issues/8764) are a couple good examples to follow.
7981

8082
If you need some more guidance, talk to the main body of open
8183
source contributors over on the [Freenode IRC channel](http://webchat.freenode.net/?channels=%23metasploit&uio=d4)

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: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
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'
5+
6+
# separate from test as simplecov is not run on travis-ci
7+
group :coverage do
8+
# code coverage for tests
9+
# any version newer than 0.5.4 gives an Encoding error when trying to read the source files.
10+
# see: https://github.com/colszowka/simplecov/issues/127 (hopefully fixed in 0.8.0)
11+
gem 'simplecov', '0.5.4', :require => false
12+
end
513

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

1718
group :development do
@@ -42,17 +43,15 @@ group :development, :test do
4243
end
4344

4445
group :pcap do
45-
gem 'network_interface', '~> 0.0.1'
46-
# For sniffer and raw socket modules
47-
gem 'pcaprub'
46+
gemspec name: 'metasploit-framework-pcap'
4847
end
4948

5049
group :test do
50+
# cucumber extension for testing command line applications, like msfconsole
51+
gem 'aruba'
52+
# cucumber + automatic database cleaning with database_cleaner
53+
gem 'cucumber-rails', :require => false
5154
gem 'shoulda-matchers'
52-
# code coverage for tests
53-
# any version newer than 0.5.4 gives an Encoding error when trying to read the source files.
54-
# see: https://github.com/colszowka/simplecov/issues/127 (hopefully fixed in 0.8.0)
55-
gem 'simplecov', '0.5.4', :require => false
5655
# Manipulate Time.now in specs
5756
gem 'timecop'
5857
end

0 commit comments

Comments
 (0)