Skip to content

Commit 55519d8

Browse files
committed
Land rapid7#3781, my addition of Metasploit::Concern to msf.
2 parents c07e900 + 6ade4d8 commit 55519d8

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ gemspec
66
group :db do
77
# Needed for Msf::DbManager
88
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
9+
# Metasploit::Concern hooks
10+
gem 'metasploit-concern', '~> 0.1.1'
911
# Metasploit::Credential database models
1012
gem 'metasploit-credential', '>= 0.9.0'
1113
# Database models shared between framework and Pro.

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ DEPENDENCIES
211211
factory_girl (>= 4.1.0)
212212
factory_girl_rails
213213
fivemat (= 1.2.1)
214+
metasploit-concern (~> 0.1.1)
214215
metasploit-credential (>= 0.9.0)
215216
metasploit-framework!
216217
metasploit_data_models (~> 0.19)

lib/metasploit/framework.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
require 'bcrypt'
1010
require 'json'
1111
require 'msgpack'
12+
require 'metasploit/concern'
1213
require 'metasploit/model'
1314
require 'nokogiri'
1415
require 'packetfu'

lib/msf/core/exploit/http/server.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ def regenerate_payload(cli, arch = nil, platform = nil, target = nil)
662662
def on_request_uri(cli, request)
663663
end
664664

665+
# allow this module to be patched at initialization-time
666+
Metasploit::Concern.run(self)
665667
end
666668

667669
###
@@ -1014,7 +1016,6 @@ def php_include_url(sock=nil)
10141016
"http://#{host}:#{datastore['SRVPORT']}#{get_resource()}?"
10151017
end
10161018

1017-
10181019
end
10191020
end
10201021

0 commit comments

Comments
 (0)