metasploit_data_models 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4025dff28108e5c8947f6b6a3cf804d1a229fc2b
|
4
|
+
data.tar.gz: b628f7bfbb605dcf70be7ecf245e2398cb20f338
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b325373dd94bdde2d38d2389f9975670d8867bc9ccc922f047c5efebc054dcf3451c88bff8d2f8bf1486adc196da70c30c11121d105694448fa3ba5c0d274c70
|
7
|
+
data.tar.gz: 87cd515fbfd12d241290d56941cc20983a959fd113b71b7162af6cb5d5eec2a6d9da05e89013ff70476c1d1991e29dbb15f520f951dcca04f5a965a0ac39caca
|
@@ -71,7 +71,6 @@ class Mdm::Module::Detail < ActiveRecord::Base
|
|
71
71
|
# @return [ActiveRecord::Relation<MetasploitDataModels::AutomaticExploitation::Match>]
|
72
72
|
has_many :matches,
|
73
73
|
:class_name => 'MetasploitDataModels::AutomaticExploitation::Match',
|
74
|
-
:dependent => :destroy,
|
75
74
|
:primary_key => :fullname,
|
76
75
|
:foreign_key => :module_fullname,
|
77
76
|
:inverse_of => :module_detail
|
@@ -8,7 +8,7 @@ RSpec.describe MetasploitDataModels::AutomaticExploitation::Match, type: :model
|
|
8
8
|
|
9
9
|
subject(:automatic_exploitation_match){ described_class.new }
|
10
10
|
|
11
|
-
before(:each
|
11
|
+
before(:each) do
|
12
12
|
automatic_exploitation_match.matchable = vuln
|
13
13
|
automatic_exploitation_match.module_fullname = module_detail.fullname
|
14
14
|
automatic_exploitation_match.save!
|
@@ -17,7 +17,21 @@ RSpec.describe MetasploitDataModels::AutomaticExploitation::Match, type: :model
|
|
17
17
|
it 'should point to the Mdm::Module::Detail with a fullname corresponding to #module_fullname' do
|
18
18
|
expect(automatic_exploitation_match.module_detail).to eq(module_detail)
|
19
19
|
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "deleting the associated Mdm::Module::Detail" do
|
23
|
+
subject(:automatic_exploitation_match){ FactoryGirl.create(:automatic_exploitation_match) }
|
24
|
+
let(:match_id){ automatic_exploitation_match.id }
|
25
|
+
|
26
|
+
before(:each) do
|
27
|
+
automatic_exploitation_match.module_detail.destroy
|
28
|
+
end
|
20
29
|
|
30
|
+
it 'should still exist in the DB' do
|
31
|
+
the_match = MetasploitDataModels::AutomaticExploitation::Match.find(match_id)
|
32
|
+
expect(the_match).to_not be_blank
|
33
|
+
end
|
21
34
|
end
|
35
|
+
|
22
36
|
end
|
23
37
|
end
|
@@ -2,5 +2,6 @@ FactoryGirl.define do
|
|
2
2
|
factory :automatic_exploitation_match, :class => MetasploitDataModels::AutomaticExploitation::Match do
|
3
3
|
association :module_detail, factory: :mdm_module_detail
|
4
4
|
association :match_set, factory: :automatic_exploitation_match_set
|
5
|
+
association :matchable, factory: :mdm_vuln
|
5
6
|
end
|
6
7
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Huckins
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-
|
14
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: metasploit-version
|
@@ -731,7 +731,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
731
731
|
version: '0'
|
732
732
|
requirements: []
|
733
733
|
rubyforge_project:
|
734
|
-
rubygems_version: 2.4.
|
734
|
+
rubygems_version: 2.4.6
|
735
735
|
signing_key:
|
736
736
|
specification_version: 4
|
737
737
|
summary: Database code for MSF and Metasploit Pro
|