Skip to content

Commit d2bc0ba

Browse files
committed
Merge remote-tracking branch 'upstream/master' into extapi_service_post
Conflicts: lib/msf/core/post/windows/services.rb
2 parents ef0826c + 904c1b2 commit d2bc0ba

File tree

643 files changed

+30233
-21903
lines changed

Some content is hidden

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

643 files changed

+30233
-21903
lines changed

.gitignore

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Gemfile.local.lock
1515
config/database.yml
1616
# simplecov coverage data
1717
coverage
18-
data/meterpreter/ext_server_pivot.x86.dll
19-
data/meterpreter/ext_server_pivot.x64.dll
2018
doc/
2119
external/source/meterpreter/java/bin
2220
external/source/meterpreter/java/build
@@ -50,6 +48,28 @@ tags
5048
*.opensdf
5149
*.user
5250

51+
# Rails log directory
52+
/log
53+
5354
# ignore release/debug folders for exploits
5455
external/source/exploits/**/Debug
5556
external/source/exploits/**/Release
57+
58+
# Avoid checking in Meterpreter binaries. These are supplied upstream by
59+
# the meterpreter_bins gem.
60+
data/meterpreter/elevator.*.dll
61+
data/meterpreter/ext_server_espia.*.dll
62+
data/meterpreter/ext_server_extapi.*.dll
63+
data/meterpreter/ext_server_incognito.*.dll
64+
data/meterpreter/ext_server_kiwi.*.dll
65+
data/meterpreter/ext_server_lanattacks.*.dll
66+
data/meterpreter/ext_server_mimikatz.*.dll
67+
data/meterpreter/ext_server_priv.*.dll
68+
data/meterpreter/ext_server_stdapi.*.dll
69+
data/meterpreter/metsrv.*.dll
70+
data/meterpreter/screenshot.*.dll
71+
72+
# Avoid checking in Meterpreter libs that are built from
73+
# private source. If you're interested in this functionality,
74+
# check out Metasploit Pro: http://metasploit.com/download
75+
data/meterpreter/ext_server_pivot.*.dll

.rubocop.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This list was intially created by analyzing the last three months (51
2+
# modules) committed to Metasploit Framework. Many, many older modules
3+
# will have offenses, but this should at least provide a baseline for
4+
# new modules.
5+
#
6+
# Updates to this file should include a 'Description' parameter for any
7+
# explaination needed.
8+
9+
# inherit_from: .rubocop_todo.yml
10+
11+
Style/ClassLength:
12+
Description: 'Most Metasploit modules are quite large. This is ok.'
13+
Enabled: true
14+
Exclude:
15+
- 'modules/**/*'
16+
17+
Style/Documentation:
18+
Enabled: true
19+
Description: 'Most Metasploit modules do not have class documentation.'
20+
Exclude:
21+
- 'modules/**/*'
22+
23+
Style/Encoding:
24+
Enabled: true
25+
Description: 'We prefer binary to UTF-8.'
26+
EnforcedStyle: 'when_needed'
27+
28+
Style/LineLength:
29+
Description: >-
30+
Metasploit modules often pattern match against very
31+
long strings when identifying targets.
32+
Enabled: true
33+
Max: 180
34+
35+
Style/MethodLength:
36+
Enabled: true
37+
Description: >-
38+
While the style guide suggests 10 lines, exploit definitions
39+
often exceed 200 lines.
40+
Max: 300
41+
42+
Style/NumericLiterals:
43+
Enabled: false
44+
Description: 'This often hurts readability for exploit-ish code.'
45+
46+
Style/SpaceInsideBrackets:
47+
Enabled: false
48+
Description: 'Until module template are final, most modules will fail this.'
49+
50+
Style/StringLiterals:
51+
Enabled: false
52+
Description: 'Single vs double quote fights are largely unproductive.'
53+
54+
Style/WordArray:
55+
Enabled: false
56+
Description: 'Metasploit prefers consistent use of []'

.yardopts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
--exclude \.ut\.rb/
44
--exclude \.ts\.rb/
55
--files CONTRIBUTING.md,COPYING,HACKING,LICENSE
6+
app/**/*.rb
67
lib/msf/**/*.rb
8+
lib/metasploit/**/*.rb
79
lib/rex/**/*.rb
10+
plugins/**/*.rb

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-f
3333
## Code Contributions
3434

3535
* **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.
3637
* **Do** follow the [50/72 rule](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for Git commit messages.
3738
* **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`.
3839

Gemfile

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,53 @@
11
source 'https://rubygems.org'
2-
3-
# Need 3+ for ActiveSupport::Concern
4-
gem 'activesupport', '>= 3.0.0', '< 4.0.0'
5-
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
6-
gem 'bcrypt'
7-
# Needed for some admin modules (scrutinizer_add_user.rb)
8-
gem 'json'
9-
# Needed by msfgui and other rpc components
10-
gem 'msgpack'
11-
# Needed by anemone crawler
12-
gem 'nokogiri'
13-
# Needed by db.rb and Msf::Exploit::Capture
14-
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'
2+
# Add default group gems to `metasploit-framework.gemspec`:
3+
# spec.add_runtime_dependency '<name>', [<version requirements>]
4+
gemspec
215

226
group :db do
237
# Needed for Msf::DbManager
248
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
9+
# Metasploit::Credential database models
10+
gem 'metasploit-credential', '>= 0.8.6', '< 0.9'
2511
# Database models shared between framework and Pro.
26-
gem 'metasploit_data_models', '~> 0.17.0'
12+
gem 'metasploit_data_models', '~> 0.19'
2713
# Needed for module caching in Mdm::ModuleDetails
2814
gem 'pg', '>= 0.11'
2915
end
3016

31-
group :pcap do
32-
gem 'network_interface', '~> 0.0.1'
33-
# For sniffer and raw socket modules
34-
gem 'pcaprub'
35-
end
36-
3717
group :development do
3818
# Markdown formatting for yard
3919
gem 'redcarpet'
4020
# generating documentation
4121
gem 'yard'
22+
# for development and testing purposes
23+
gem 'pry'
4224
end
4325

4426
group :development, :test do
4527
# supplies factories for producing model instance for specs
4628
# Version 4.1.0 or newer is needed to support generate calls without the
4729
# 'FactoryGirl.' in factory definitions syntax.
4830
gem 'factory_girl', '>= 4.1.0'
31+
# automatically include factories from spec/factories
32+
gem 'factory_girl_rails'
4933
# Make rspec output shorter and more useful
5034
gem 'fivemat', '1.2.1'
5135
# running documentation generation tasks and rspec tasks
5236
gem 'rake', '>= 10.0.0'
37+
# testing framework
38+
gem 'rspec', '>= 2.12', '< 3.0.0'
39+
# Define `rake spec`. Must be in development AND test so that its available by default as a rake test when the
40+
# environment is development
41+
gem 'rspec-rails' , '>= 2.12', '< 3.0.0'
42+
end
43+
44+
group :pcap do
45+
gem 'network_interface', '~> 0.0.1'
46+
# For sniffer and raw socket modules
47+
gem 'pcaprub'
5348
end
5449

5550
group :test do
56-
# Removes records from database created during tests. Can't use rspec-rails'
57-
# transactional fixtures because multiple connections are in use so
58-
# transactions won't work.
59-
gem 'database_cleaner'
60-
# testing framework
61-
gem 'rspec', '>= 2.12'
6251
gem 'shoulda-matchers'
6352
# code coverage for tests
6453
# any version newer than 0.5.4 gives an Encoding error when trying to read the source files.

Gemfile.local.example

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ end
2727

2828
# Create a custom group
2929
group :local do
30-
# Use pry to help view and interact with objects in the framework
31-
gem 'pry', '~> 0.9'
3230
# Use pry-debugger to step through code during development
3331
gem 'pry-debugger', '~> 0.2'
3432
# Add the lab gem so that the 'lab' plugin will work again

0 commit comments

Comments
 (0)