Skip to content

Commit ab7848a

Browse files
author
HD Moore
committed
Merge master for testing of rapid7#2809
2 parents 022c52d + 5e7f356 commit ab7848a

File tree

1,281 files changed

+62651
-34280
lines changed

Some content is hidden

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

1,281 files changed

+62651
-34280
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.bundle
2+
Gemfile.local
3+
Gemfile.local.lock
24
# Rubymine project directory
35
.idea
46
# Sublime Text project directory (not created by ST by default)

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
1818
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
1919
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
2020
trosen-r7 <trosen-r7@github> Trevor Rosen <[email protected]>
21+
trosen-r7 <trosen-r7@github> Trevor Rosen <[email protected]>
2122
wchen-r7 <wchen-r7@github> sinn3r <[email protected]> # aka sinn3r
2223
wchen-r7 <wchen-r7@github> sinn3r <[email protected]>
2324
wchen-r7 <wchen-r7@github> Wei Chen <[email protected]>

.ruby-version

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

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
language: ruby
2-
env: MSF_SPOTCHECK_RECENT=1
32
before_install:
43
- rake --version
54
- sudo apt-get update -qq
65
- sudo apt-get install -qq libpcap-dev
6+
# Uncomment when we have fewer shipping msftidy warnings.
7+
# Merge committers will still be checking, just not autofailing.
8+
# See https://dev.metasploit.com/redmine/issues/8498
9+
# - ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
10+
# - ls -la ./.git/hooks
11+
# - ./.git/hooks/post-merge
712
before_script:
8-
- ./tools/msftidy.rb
913
- cp config/database.yml.travis config/database.yml
1014
- bundle exec rake --version
1115
- bundle exec rake db:create

CONTRIBUTING.md

Lines changed: 83 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,85 @@
1+
# Hello, World!
2+
3+
Thanks for your interest in making Metasploit -- and therefore, the
4+
world -- a better place!
5+
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.
9+
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.
13+
14+
Are you about to contribute some new functionality, a bug fix, or a new
15+
Metasploit module? If so, read on...
16+
117
# Contributing to Metasploit
218

3-
## Reporting Bugs
4-
5-
If you would like to report a bug, please take a look at [our Redmine
6-
issue
7-
tracker](https://dev.metasploit.com/redmine/projects/framework/issues?query_id=420)
8-
-- your bug may already have been reported there! Simply [searching](https://dev.metasploit.com/redmine/projects/framework/search) for some appropriate keywords may save everyone a lot of hassle.
9-
10-
If your bug is new and you'd like to report it you will need to
11-
[register
12-
first](https://dev.metasploit.com/redmine/account/register). Don't
13-
worry, it's easy and fun and takes about 30 seconds.
14-
15-
When you file a bug report, please include your **steps to reproduce**,
16-
full copy-pastes of Ruby stack traces, and any relevant details about
17-
your environment. Without repro steps, your bug will likely be closed.
18-
With repro steps, your bugs will likely be fixed.
19-
20-
## Contributing Metasploit Modules
21-
22-
If you have an exploit that you'd like to contribute to the Metasploit
23-
Framework, please familiarize yourself with the
24-
**[HACKING](https://github.com/rapid7/metasploit-framework/blob/master/HACKING)**
25-
document in the
26-
Metasploit-Framework repository. There are many mysteries revealed in
27-
HACKING concerning code style and content.
28-
29-
[Pull requests](https://github.com/rapid7/metasploit-framework/pulls)
30-
should corellate with modules at a 1:1 ratio
31-
-- there is rarely a good reason to have two, three, or ten modules on
32-
one pull request, as this dramatically increases the review time
33-
required to land (commit) any of those modules.
34-
35-
Pull requests tend to be very collaborative for Metasploit -- do not be
36-
surprised if your pull request to rapid7/metasploit-framework triggers a
37-
pull request back to your own fork. In this way, we can isolate working
38-
changes before landing your PR to the Metasploit master branch.
39-
40-
To save yourself the embarrassment of committing common errors, you will
41-
want to symlink the `msftidy.rb` utility to your pre-commit hooks by
42-
running `ln -s ../../tools/dev/pre-commit-hook.rb .git/hooks/pre-commit`
43-
from the top-level directory of your metasploit-framework clone. This
44-
will prevent you from committing modules that raise WARNINGS or ERRORS.
19+
What you see here in CONTRIBUTING.md is a bullet-point list of the do's
20+
and don'ts of how to make sure *your* valuable contributions actually
21+
make it into Metasploit's master branch.
22+
23+
If you care not to follow these rules, your contribution **will** be
24+
closed (*Road House* style). Sorry!
25+
26+
This is intended to be a **short** list. The
27+
[wiki](https://github.com/rapid7/metasploit-framework/wiki) is much more
28+
exhaustive and reveals many mysteries. If you read nothing else, take a
29+
look at the standard [development environment setup
30+
guide](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment)
31+
and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-framework/wiki/Common-Metasploit-Module-Coding-Mistakes).
32+
33+
## Code Contributions
34+
35+
* **Do** stick to the [Ruby style guide](https://github.com/bbatsov/ruby-style-guide).
36+
* **Do** follow the [50/72 rule](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for Git commit messages.
37+
* **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`.
38+
39+
### Pull Requests
40+
41+
* **Do** target your pull request to the **master branch**. Not staging, not develop, not release.
42+
* **Do** specify a descriptive title to make searching for your pull request easier.
43+
* **Do** include [console output](https://help.github.com/articles/github-flavored-markdown#fenced-code-blocks), especially for witnessable effects in `msfconsole`.
44+
* **Do** list [verification steps](https://help.github.com/articles/writing-on-github#task-lists) so your code is testable.
45+
* **Don't** leave your pull request description blank.
46+
* **Don't** abandon your pull request. Being responsive helps us land your code faster.
47+
48+
Pull requests [#2940](https://github.com/rapid7/metasploit-framework/pull/2940) and [#3043](https://github.com/rapid7/metasploit-framework/pull/3043) are a couple good examples to follow.
49+
50+
#### New Modules
51+
52+
* **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).
53+
* **Do** use the [many module mixin APIs](https://dev.metasploit.com/api/). Wheel improvements are welcome; wheel reinventions, not so much.
54+
* **Don't** include more than one module per pull request.
55+
56+
#### Library Code
57+
58+
* **Do** write [RSpec](http://rspec.info/) tests - even the smallest change in library land can thoroughly screw things up.
59+
* **Do** follow [Better Specs](http://betterspecs.org/) - it's like the style guide for specs.
60+
* **Do** write [YARD](http://yardoc.org/) documentation - this makes it easier for people to use your code.
61+
* **Don't** fix a lot of things in one pull request. Small fixes are easier to validate.
62+
63+
#### Bug Fixes
64+
65+
* **Do** include reproduction steps in the form of verification steps.
66+
* **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.
67+
68+
## Bug Reports
69+
70+
* **Do** report vulnerabilities in Rapid7 software directly to [email protected].
71+
* **Do** create a Redmine account and report your non-vulnerability bugs there.
72+
* **Do** write a detailed description of your bug and use a descriptive title.
73+
* **Do** include reproduction steps, stack traces, and anything else that might help us verify and fix your bug.
74+
* **Don't** file duplicate reports - search for your bug before filing a new report.
75+
* **Don't** report a bug on GitHub. Use [Redmine](https://dev.metasploit.com/redmine/projects/framework) instead.
76+
77+
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.
78+
79+
If you need some more guidance, talk to the main body of open
80+
source contributors over on the [Freenode IRC channel](http://webchat.freenode.net/?channels=%23metasploit&uio=d4)
81+
or e-mail us at [metasploit-hackers](https://lists.sourceforge.net/lists/listinfo/metasploit-hackers)
82+
mailing list.
83+
84+
Also, **thank you** for taking the few moments to read this far! You're
85+
already way ahead of the curve, so keep it up!

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-2013, Rapid7, Inc.
22
All rights reserved.
33

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

Gemfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
source 'https://rubygems.org'
22

33
# Need 3+ for ActiveSupport::Concern
4-
gem 'activesupport', '>= 3.0.0'
4+
gem 'activesupport', '>= 3.0.0', '< 4.0.0'
55
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
6-
gem 'bcrypt-ruby'
6+
gem 'bcrypt'
77
# Needed for some admin modules (scrutinizer_add_user.rb)
88
gem 'json'
99
# Needed by msfgui and other rpc components
1010
gem 'msgpack'
1111
# Needed by anemone crawler
1212
gem 'nokogiri'
13-
# Needed by anemone crawler
14-
gem 'robots'
1513
# Needed by db.rb and Msf::Exploit::Capture
1614
gem 'packetfu', '1.1.9'
15+
# Needed by JSObfu
16+
gem 'rkelly-remix', '0.0.6'
17+
# Needed by anemone crawler
18+
gem 'robots'
19+
# Needed for some post modules
20+
gem 'sqlite3'
1721

1822
group :db do
1923
# Needed for Msf::DbManager
20-
gem 'activerecord'
24+
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
2125
# Database models shared between framework and Pro.
22-
gem 'metasploit_data_models', '~> 0.16.9'
26+
gem 'metasploit_data_models', '~> 0.17.0'
2327
# Needed for module caching in Mdm::ModuleDetails
2428
gem 'pg', '>= 0.11'
2529
end

Gemfile.local.example

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
##
2+
# Example Gemfile.local file for Metasploit Framework
3+
#
4+
# The Gemfile.local file provides a way to use other gems that are not
5+
# included in the standard Gemfile provided with Metasploit.
6+
# This filename is included in Metasploit's .gitignore file, so local changes
7+
# to this file will not accidentally show up in future pull requests. This
8+
# example Gemfile.local includes all gems in Gemfile using instance_eval.
9+
# It also creates a new bundle group, 'local', to hold additional gems.
10+
#
11+
# This file will not be used by default within the framework. As such, one
12+
# must first install the custom Gemfile.local with bundle:
13+
# bundle install --gemfile Gemfile.local
14+
#
15+
# Note that msfupdate does not consider Gemfile.local when updating the
16+
# framework. If it is used, it may be necessary to run the above bundle
17+
# command after the update.
18+
#
19+
###
20+
21+
# Include the Gemfile included with the framework. This is very
22+
# important for picking up new gem dependencies.
23+
msf_gemfile = File.join(File.dirname(__FILE__), 'Gemfile')
24+
if File.readable?(msf_gemfile)
25+
instance_eval(File.read(msf_gemfile))
26+
end
27+
28+
# Create a custom group
29+
group :local do
30+
# Use pry to help view and interact with objects in the framework
31+
gem 'pry', '~> 0.9'
32+
# Use pry-debugger to step through code during development
33+
gem 'pry-debugger', '~> 0.2'
34+
# Add the lab gem so that the 'lab' plugin will work again
35+
gem 'lab', '~> 0.2.7'
36+
end

Gemfile.lock

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GEM
1313
i18n (~> 0.6, >= 0.6.4)
1414
multi_json (~> 1.0)
1515
arel (3.0.2)
16-
bcrypt-ruby (3.1.2)
16+
bcrypt (3.1.7)
1717
builder (3.0.4)
1818
database_cleaner (1.1.1)
1919
diff-lcs (1.2.4)
@@ -22,7 +22,7 @@ GEM
2222
fivemat (1.2.1)
2323
i18n (0.6.5)
2424
json (1.8.0)
25-
metasploit_data_models (0.16.9)
25+
metasploit_data_models (0.17.0)
2626
activerecord (>= 3.2.13)
2727
activesupport
2828
pg
@@ -37,6 +37,7 @@ GEM
3737
pg (0.16.0)
3838
rake (10.1.0)
3939
redcarpet (3.0.0)
40+
rkelly-remix (0.0.6)
4041
robots (0.10.1)
4142
rspec (2.14.1)
4243
rspec-core (~> 2.14.0)
@@ -52,6 +53,7 @@ GEM
5253
multi_json (~> 1.0.3)
5354
simplecov-html (~> 0.5.3)
5455
simplecov-html (0.5.3)
56+
sqlite3 (1.3.9)
5557
timecop (0.6.3)
5658
tzinfo (0.3.37)
5759
yard (0.8.7)
@@ -60,14 +62,14 @@ PLATFORMS
6062
ruby
6163

6264
DEPENDENCIES
63-
activerecord
64-
activesupport (>= 3.0.0)
65-
bcrypt-ruby
65+
activerecord (>= 3.0.0, < 4.0.0)
66+
activesupport (>= 3.0.0, < 4.0.0)
67+
bcrypt
6668
database_cleaner
6769
factory_girl (>= 4.1.0)
6870
fivemat (= 1.2.1)
6971
json
70-
metasploit_data_models (~> 0.16.9)
72+
metasploit_data_models (~> 0.17.0)
7173
msgpack
7274
network_interface (~> 0.0.1)
7375
nokogiri
@@ -76,9 +78,11 @@ DEPENDENCIES
7678
pg (>= 0.11)
7779
rake (>= 10.0.0)
7880
redcarpet
81+
rkelly-remix (= 0.0.6)
7982
robots
8083
rspec (>= 2.12)
8184
shoulda-matchers
8285
simplecov (= 0.5.4)
86+
sqlite3
8387
timecop
8488
yard

0 commit comments

Comments
 (0)