Skip to content

Commit eb33ece

Browse files
author
Pedro Ribeiro
committed
Merge pull request #10 from rapid7/master
bla
2 parents 7d2d0aa + 65b9aa1 commit eb33ece

File tree

252 files changed

+9674
-3016
lines changed

Some content is hidden

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

252 files changed

+9674
-3016
lines changed

.rubocop.yml

Lines changed: 8 additions & 3 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,14 +25,14 @@ 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
@@ -44,6 +44,11 @@ Style/MethodLength:
4444
Style/Encoding:
4545
Enabled: false
4646

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+
4752
Style/NumericLiterals:
4853
Enabled: false
4954
Description: 'This often hurts readability for exploit-ish code.'

.ruby-version

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

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ env:
55
- RAKE_TASK=spec SPEC_OPTS="--tag ~content"
66

77
language: ruby
8+
matrix:
9+
fast_finish: true
810
before_install:
911
- rake --version
1012
- sudo apt-get update -qq
@@ -20,7 +22,9 @@ before_script:
2022
- bundle exec rake --version
2123
- bundle exec rake db:create
2224
- bundle exec rake db:migrate
23-
script: "bundle exec rake $RAKE_TASK"
25+
script:
26+
# fail build if db/schema.rb update is not committed
27+
- git diff --exit-code && bundle exec rake $RAKE_TASK
2428

2529
rvm:
2630
- '1.9.3'

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-f
3737
## Code Contributions
3838

3939
* **Do** stick to the [Ruby style guide](https://github.com/bbatsov/ruby-style-guide).
40-
* *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.
4141
* **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.
4244
* **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`.
4345

4446
### Pull Requests

Gemfile

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
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'
55

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

1810
group :development do
@@ -43,9 +35,7 @@ group :development, :test do
4335
end
4436

4537
group :pcap do
46-
gem 'network_interface', '~> 0.0.1'
47-
# For sniffer and raw socket modules
48-
gem 'pcaprub'
38+
gemspec name: 'metasploit-framework-pcap'
4939
end
5040

5141
group :test do

Gemfile.lock

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PATH
99
json
1010
metasploit-concern (~> 0.3.0)
1111
metasploit-model (~> 0.28.0)
12-
meterpreter_bins (= 0.0.10)
12+
meterpreter_bins (= 0.0.11)
1313
msgpack
1414
nokogiri
1515
packetfu (= 1.1.9)
@@ -20,6 +20,16 @@ PATH
2020
rubyzip (~> 1.1)
2121
sqlite3
2222
tzinfo
23+
metasploit-framework-db (4.10.1.pre.dev)
24+
activerecord (< 4.0.0)
25+
metasploit-credential (~> 0.13.3)
26+
metasploit-framework (= 4.10.1.pre.dev)
27+
metasploit_data_models (~> 0.21.1)
28+
pg (>= 0.11)
29+
metasploit-framework-pcap (4.10.1.pre.dev)
30+
metasploit-framework (= 4.10.1.pre.dev)
31+
network_interface (~> 0.0.1)
32+
pcaprub
2333

2434
GEM
2535
remote: https://rubygems.org/
@@ -102,7 +112,7 @@ GEM
102112
metasploit-concern (0.3.0)
103113
activesupport (~> 3.0, >= 3.0.0)
104114
railties (< 4.0.0)
105-
metasploit-credential (0.12.0)
115+
metasploit-credential (0.13.3)
106116
metasploit-concern (~> 0.3.0)
107117
metasploit-model (~> 0.28.0)
108118
metasploit_data_models (~> 0.21.0)
@@ -113,7 +123,7 @@ GEM
113123
metasploit-model (0.28.0)
114124
activesupport
115125
railties (< 4.0.0)
116-
metasploit_data_models (0.21.1)
126+
metasploit_data_models (0.21.2)
117127
activerecord (>= 3.2.13, < 4.0.0)
118128
activesupport
119129
arel-helpers
@@ -122,15 +132,15 @@ GEM
122132
pg
123133
railties (< 4.0.0)
124134
recog (~> 1.0)
125-
meterpreter_bins (0.0.10)
135+
meterpreter_bins (0.0.11)
126136
method_source (0.8.2)
127137
mime-types (1.25.1)
128-
mini_portile (0.6.0)
138+
mini_portile (0.6.1)
129139
msgpack (0.5.9)
130140
multi_json (1.0.4)
131141
network_interface (0.0.1)
132-
nokogiri (1.6.3.1)
133-
mini_portile (= 0.6.0)
142+
nokogiri (1.6.4.1)
143+
mini_portile (~> 0.6.0)
134144
packetfu (1.1.9)
135145
pcaprub (0.11.3)
136146
pg (0.17.1)
@@ -165,7 +175,7 @@ GEM
165175
rb-readline (0.5.1)
166176
rdoc (3.12.2)
167177
json (~> 1.4)
168-
recog (1.0.0)
178+
recog (1.0.5)
169179
nokogiri
170180
redcarpet (3.1.2)
171181
rkelly-remix (0.0.6)
@@ -197,19 +207,19 @@ GEM
197207
simplecov-html (~> 0.5.3)
198208
simplecov-html (0.5.3)
199209
slop (3.6.0)
200-
sprockets (2.2.2)
210+
sprockets (2.2.3)
201211
hike (~> 1.2)
202212
multi_json (~> 1.0)
203213
rack (~> 1.0)
204214
tilt (~> 1.1, != 1.3.0)
205-
sqlite3 (1.3.9)
215+
sqlite3 (1.3.10)
206216
thor (0.19.1)
207217
tilt (1.4.1)
208218
timecop (0.7.1)
209219
treetop (1.4.15)
210220
polyglot
211221
polyglot (>= 0.3.1)
212-
tzinfo (0.3.41)
222+
tzinfo (0.3.42)
213223
xpath (2.0.0)
214224
nokogiri (~> 1.3)
215225
yard (0.8.7.4)
@@ -218,18 +228,14 @@ PLATFORMS
218228
ruby
219229

220230
DEPENDENCIES
221-
activerecord (>= 3.0.0, < 4.0.0)
222231
aruba
223232
cucumber-rails
224233
factory_girl (>= 4.1.0)
225234
factory_girl_rails
226235
fivemat (= 1.2.1)
227-
metasploit-credential (~> 0.12.0)
228236
metasploit-framework!
229-
metasploit_data_models (~> 0.21.1)
230-
network_interface (~> 0.0.1)
231-
pcaprub
232-
pg (>= 0.11)
237+
metasploit-framework-db!
238+
metasploit-framework-pcap!
233239
pry
234240
rake (>= 10.0.0)
235241
redcarpet

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ require 'metasploit/framework/spec/untested_payloads'
1010
Metasploit::Framework::Require.optionally_active_record_railtie
1111

1212
Metasploit::Framework::Application.load_tasks
13+
Metasploit::Framework::Spec::Constants.define_task
14+
Metasploit::Framework::Spec::Threads::Suite.define_task
1315
Metasploit::Framework::Spec::UntestedPayloads.define_task

config/boot.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@
2323
end
2424

2525
begin
26-
require 'bundler'
26+
require 'bundler/setup'
2727
rescue LoadError
2828
$stderr.puts "[*] Metasploit requires the Bundler gem to be installed"
2929
$stderr.puts " $ gem install bundler"
30-
exit(0)
30+
exit(1)
3131
end
3232

33-
Bundler.setup
34-
3533
lib_path = root.join('lib').to_path
3634

3735
unless $LOAD_PATH.include? lib_path
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="bin" ContentType="application/vnd.openxmlformats-officedocument.oleObject"/><Default Extension="wmf" ContentType="image/x-wmf"/><Default Extension="jpeg" ContentType="image/jpeg"/><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="vml" ContentType="application/vnd.openxmlformats-officedocument.vmlDrawing"/><Override PartName="/ppt/presentation.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml"/><Override PartName="/ppt/slideMasters/slideMaster1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"/><Override PartName="/ppt/slides/slide1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slide+xml"/><Override PartName="/ppt/presProps.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"/><Override PartName="/ppt/viewProps.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"/><Override PartName="/ppt/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/ppt/tableStyles.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"/><Override PartName="/ppt/slideLayouts/slideLayout1.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout2.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout3.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout4.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout5.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout6.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout7.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout8.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout9.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout10.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/ppt/slideLayouts/slideLayout11.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail" Target="docProps/thumbnail.jpeg"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="ppt/presentation.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/></Relationships>

0 commit comments

Comments
 (0)