Skip to content

Commit 6d92d70

Browse files
author
HD Moore
committed
Merge feature/recog into post-electro master for this PR
2 parents 740f75d + e656a81 commit 6d92d70

File tree

644 files changed

+30190
-21891
lines changed

Some content is hidden

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

644 files changed

+30190
-21891
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: 23 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,54 @@
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-
20-
# Needed for service fingerprinting (Recog)
21-
gem 'recog', :git => '[email protected]:rapid7/recog.git'
22-
23-
# Needed for some post modules
24-
gem 'sqlite3'
2+
# Add default group gems to `metasploit-framework.gemspec`:
3+
# spec.add_runtime_dependency '<name>', [<version requirements>]
4+
gemspec
255

266
group :db do
277
# Needed for Msf::DbManager
288
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
29-
30-
# Database models shared between framework and Pro (depends on hmoore-r7 branch until merged)
31-
# Unfortunately, MDM is broken after 0.17.0 in master right now, so waiting on that merge...
32-
33-
gem 'metasploit_data_models', '= 0.17.2'
34-
# gem 'metasploit_data_models', :git => '[email protected]:hmoore-r7/metasploit_data_models.git'
35-
9+
# Metasploit::Credential database models
10+
gem 'metasploit-credential', '>= 0.8.6', '< 0.9'
11+
# Database models shared between framework and Pro.
12+
# gem 'metasploit_data_models', '~> 0.19'
13+
gem 'metasploit_data_models', :git => '[email protected]:hmoore-r7/metasploit_data_models.git'
3614
# Needed for module caching in Mdm::ModuleDetails
3715
gem 'pg', '>= 0.11'
3816
end
3917

40-
group :pcap do
41-
gem 'network_interface', '~> 0.0.1'
42-
# For sniffer and raw socket modules
43-
gem 'pcaprub'
44-
end
45-
4618
group :development do
4719
# Markdown formatting for yard
4820
gem 'redcarpet'
4921
# generating documentation
5022
gem 'yard'
23+
# for development and testing purposes
24+
gem 'pry'
5125
end
5226

5327
group :development, :test do
5428
# supplies factories for producing model instance for specs
5529
# Version 4.1.0 or newer is needed to support generate calls without the
5630
# 'FactoryGirl.' in factory definitions syntax.
5731
gem 'factory_girl', '>= 4.1.0'
32+
# automatically include factories from spec/factories
33+
gem 'factory_girl_rails'
5834
# Make rspec output shorter and more useful
5935
gem 'fivemat', '1.2.1'
6036
# running documentation generation tasks and rspec tasks
6137
gem 'rake', '>= 10.0.0'
38+
# testing framework
39+
gem 'rspec', '>= 2.12', '< 3.0.0'
40+
# Define `rake spec`. Must be in development AND test so that its available by default as a rake test when the
41+
# environment is development
42+
gem 'rspec-rails' , '>= 2.12', '< 3.0.0'
43+
end
44+
45+
group :pcap do
46+
gem 'network_interface', '~> 0.0.1'
47+
# For sniffer and raw socket modules
48+
gem 'pcaprub'
6249
end
6350

6451
group :test do
65-
# Removes records from database created during tests. Can't use rspec-rails'
66-
# transactional fixtures because multiple connections are in use so
67-
# transactions won't work.
68-
gem 'database_cleaner'
69-
# testing framework
70-
gem 'rspec', '>= 2.12'
7152
gem 'shoulda-matchers'
7253
# code coverage for tests
7354
# 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)