Skip to content

Commit 249a09c

Browse files
committed
Update to metasploit_data_models 0.7.1
[#47979793]
1 parent 9207ed6 commit 249a09c

File tree

15 files changed

+314
-255
lines changed

15 files changed

+314
-255
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ gem 'activerecord'
77
# Needed for some admin modules (scrutinizer_add_user.rb)
88
gem 'json'
99
# Database models shared between framework and Pro.
10-
gem 'metasploit_data_models', '~> 0.6.14'
10+
gem 'metasploit_data_models', '~> 0.7.1'
1111
# Needed by msfgui and other rpc components
1212
gem 'msgpack'
1313
# Needed by anemone crawler
1414
gem 'nokogiri'
15-
# Needed for module caching in Mdm::ModuleDetails
15+
# Needed for module caching in Mdm::Module::Details
1616
gem 'pg', '>= 0.11'
1717
# Needed by anemone crawler
1818
gem 'robots'

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GEM
2323
i18n (0.6.1)
2424
json (1.7.7)
2525
metaclass (0.0.1)
26-
metasploit_data_models (0.6.14)
26+
metasploit_data_models (0.7.1)
2727
activerecord (>= 3.2.13)
2828
activesupport
2929
pg
@@ -65,7 +65,7 @@ DEPENDENCIES
6565
database_cleaner
6666
factory_girl (>= 4.1.0)
6767
json
68-
metasploit_data_models (~> 0.6.14)
68+
metasploit_data_models (~> 0.7.1)
6969
msgpack
7070
nokogiri
7171
pcaprub

db/schema.rb

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# It's strongly recommended to check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(:version => 20130228214900) do
14+
ActiveRecord::Schema.define(:version => 20130412175040) do
1515

1616
create_table "api_keys", :force => true do |t|
1717
t.text "token"
@@ -223,26 +223,26 @@
223223
end
224224

225225
create_table "module_actions", :force => true do |t|
226-
t.integer "module_detail_id"
226+
t.integer "detail_id"
227227
t.text "name"
228228
end
229229

230-
add_index "module_actions", ["module_detail_id"], :name => "index_module_actions_on_module_detail_id"
230+
add_index "module_actions", ["detail_id"], :name => "index_module_actions_on_module_detail_id"
231231

232232
create_table "module_archs", :force => true do |t|
233-
t.integer "module_detail_id"
233+
t.integer "detail_id"
234234
t.text "name"
235235
end
236236

237-
add_index "module_archs", ["module_detail_id"], :name => "index_module_archs_on_module_detail_id"
237+
add_index "module_archs", ["detail_id"], :name => "index_module_archs_on_module_detail_id"
238238

239239
create_table "module_authors", :force => true do |t|
240-
t.integer "module_detail_id"
240+
t.integer "detail_id"
241241
t.text "name"
242242
t.text "email"
243243
end
244244

245-
add_index "module_authors", ["module_detail_id"], :name => "index_module_authors_on_module_detail_id"
245+
add_index "module_authors", ["detail_id"], :name => "index_module_authors_on_module_detail_id"
246246

247247
create_table "module_details", :force => true do |t|
248248
t.datetime "mtime"
@@ -268,34 +268,34 @@
268268
add_index "module_details", ["refname"], :name => "index_module_details_on_refname"
269269

270270
create_table "module_mixins", :force => true do |t|
271-
t.integer "module_detail_id"
271+
t.integer "detail_id"
272272
t.text "name"
273273
end
274274

275-
add_index "module_mixins", ["module_detail_id"], :name => "index_module_mixins_on_module_detail_id"
275+
add_index "module_mixins", ["detail_id"], :name => "index_module_mixins_on_module_detail_id"
276276

277277
create_table "module_platforms", :force => true do |t|
278-
t.integer "module_detail_id"
278+
t.integer "detail_id"
279279
t.text "name"
280280
end
281281

282-
add_index "module_platforms", ["module_detail_id"], :name => "index_module_platforms_on_module_detail_id"
282+
add_index "module_platforms", ["detail_id"], :name => "index_module_platforms_on_module_detail_id"
283283

284284
create_table "module_refs", :force => true do |t|
285-
t.integer "module_detail_id"
285+
t.integer "detail_id"
286286
t.text "name"
287287
end
288288

289-
add_index "module_refs", ["module_detail_id"], :name => "index_module_refs_on_module_detail_id"
289+
add_index "module_refs", ["detail_id"], :name => "index_module_refs_on_module_detail_id"
290290
add_index "module_refs", ["name"], :name => "index_module_refs_on_name"
291291

292292
create_table "module_targets", :force => true do |t|
293-
t.integer "module_detail_id"
293+
t.integer "detail_id"
294294
t.integer "index"
295295
t.text "name"
296296
end
297297

298-
add_index "module_targets", ["module_detail_id"], :name => "index_module_targets_on_module_detail_id"
298+
add_index "module_targets", ["detail_id"], :name => "index_module_targets_on_module_detail_id"
299299

300300
create_table "nexpose_consoles", :force => true do |t|
301301
t.datetime "created_at", :null => false

lib/msf/core/db.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ def report_session(opts)
780780

781781
if session.via_exploit == "exploit/multi/handler" and sess_data[:datastore]['ParentModule']
782782
mod_fullname = sess_data[:datastore]['ParentModule']
783-
mod_name = ::Mdm::ModuleDetail.find_by_fullname(mod_fullname).name
783+
mod_name = ::Mdm::Module::Detail.find_by_fullname(mod_fullname).name
784784
else
785785
mod_name = mod.name
786786
mod_fullname = mod.fullname

lib/msf/core/db_export.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,14 +363,14 @@ def create_xml_element(key,value)
363363
# directly, it is the caller's responsibility to add an opening and closing
364364
# tag to report_file around the call to {#extract_module_detail_info}.
365365
#
366-
# Writes a module_detail element to the report_file for each
367-
# Mdm::ModuleDetail.
366+
# Writes a module_detail element to the report_file for each
367+
# Mdm::Module::Detail.
368368
#
369369
# @param report_file [#write, #flush] IO stream to which to write the
370370
# module_detail elements.
371371
# @return [void]
372372
def extract_module_detail_info(report_file)
373-
Mdm::ModuleDetail.all.each do |m|
373+
Mdm:Module::Detail.all.each do |m|
374374
report_file.write("<module_detail>\n")
375375
m_id = m.attributes["id"]
376376

0 commit comments

Comments
 (0)