Skip to content

Commit c474ff4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into extapi_service_post
Conflicts: modules/exploits/windows/local/service_permissions.rb modules/post/windows/manage/rpcapd_start.rb
2 parents a2719d2 + a8915f0 commit c474ff4

File tree

915 files changed

+39510
-32461
lines changed

Some content is hidden

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

915 files changed

+39510
-32461
lines changed

.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/documents/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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
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 JSObfu
14+
gem 'rkelly-remix', '0.0.6'
1315
# Needed by anemone crawler
1416
gem 'robots'
1517
# Needed by db.rb and Msf::Exploit::Capture
1618
gem 'packetfu', '1.1.9'
1719

1820
group :db do
1921
# Needed for Msf::DbManager
20-
gem 'activerecord'
22+
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
2123
# Database models shared between framework and Pro.
22-
gem 'metasploit_data_models', '~> 0.16.9'
24+
gem 'metasploit_data_models', '~> 0.17.0'
2325
# Needed for module caching in Mdm::ModuleDetails
2426
gem 'pg', '>= 0.11'
2527
end

Gemfile.lock

Lines changed: 8 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)
@@ -60,14 +61,14 @@ PLATFORMS
6061
ruby
6162

6263
DEPENDENCIES
63-
activerecord
64-
activesupport (>= 3.0.0)
65-
bcrypt-ruby
64+
activerecord (>= 3.0.0, < 4.0.0)
65+
activesupport (>= 3.0.0, < 4.0.0)
66+
bcrypt
6667
database_cleaner
6768
factory_girl (>= 4.1.0)
6869
fivemat (= 1.2.1)
6970
json
70-
metasploit_data_models (~> 0.16.9)
71+
metasploit_data_models (~> 0.17.0)
7172
msgpack
7273
network_interface (~> 0.0.1)
7374
nokogiri
@@ -76,6 +77,7 @@ DEPENDENCIES
7677
pg (>= 0.11)
7778
rake (>= 10.0.0)
7879
redcarpet
80+
rkelly-remix (= 0.0.6)
7981
robots
8082
rspec (>= 2.12)
8183
shoulda-matchers

0 commit comments

Comments
 (0)