metasploit_data_models 0.16.8 → 0.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjZiN2ZhMDBlMzg3YzY0MGVlMjg0NGE1ZmJlNjAwYWQ4ZDM4ZGNhYw==
4
+ MjU1NGM5ZjAwZjAwYThjNTQ2YmE4OTk4MTQ2ZGRhYzA5ZmY2OTE1Mw==
5
5
  data.tar.gz: !binary |-
6
- NDkxNTVmZWUzNGRiNzk0YzYyZTQ3ZTQwMWZkOGE4NGQ2MWZlMmY3Mg==
6
+ NWZkNjZkYTY0ODE4ODI5NzRjYjRhZWY3MzAwZmZhZmFmY2NjNzBlZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2IzY2RhMDI1NGY0YWNhMzFlN2MzMjk2YjIwNmIzOWIxMTNkNmQ5MTlmNTI4
10
- N2M4MGVjMTFkYTA5NTFiYWE4MzhjZGIxYjI3MTZmZWZkYTA1ODdiNWNlZmQ2
11
- YmY3NTM1ZjA3ZDE1NDQ0ZTAzNTgzYzBmNGJkMWU5MTA4OTU0MTg=
9
+ NGY1YjlhYzhiMjMyMzQ1MjFjMTllMTA2N2RlNGMwM2U4NWVlMGQ0OTMzNzE4
10
+ ZTliMjViMjFlYjJkZjEwNDA2ODFhN2ViOWY3MDQ1MTVjMjY2ZmY0MDg4ODFl
11
+ NTkxNzgwYjE4ZjhlNTg1MWRjY2JiYmVhNWE5YTQ4OTE0ZTJiMTU=
12
12
  data.tar.gz: !binary |-
13
- NjhiYTQ5MDgyOTMwMmUyNjAzNjA4NjgzYTVhMjM2NDk5NDE2MDc2YTQ2MzE4
14
- NGUxODgxMmVkMmE3YjA2ZWY4NGU5ZjA3Yzk2ODkwYTg5ODA1OWNhZTc3NTQz
15
- OTI0YjQ0OTU0NDVmNTI0MjliMDQ1OTFmOGVhZTgyODlkYmJhNGY=
13
+ YzdjZWYxNGVlNTAxYjRlOWNkZDc0ZWIwZjYzODYzMTlmMDAwYzg4NmRmZmM3
14
+ YmQ1ZDVkM2FlZjNkYjNhYTEwZThmZTE3MjJiODM3YjkzMzMyZjY1OWYyYzQw
15
+ ZjYxZDQ2NzdkNWU3OTkzZTUzZmFkYjE3OTU0ZTkwZDFjNzkxZjQ=
@@ -53,6 +53,12 @@ class Mdm::Host < ActiveRecord::Base
53
53
  # Associations
54
54
  #
55
55
 
56
+ # @!attribute [rw] clients
57
+ # Users connected to this host
58
+ #
59
+ # @return [Array<Mdm::Client>]
60
+ has_many :clients, class_name: 'Mdm::Client', dependent: :destroy
61
+
56
62
  # @!attribute [rw] task_hosts
57
63
  # Details about what Tasks touched this host
58
64
  #
@@ -4,5 +4,5 @@ module MetasploitDataModels
4
4
  # metasploit-framework/data/sql/migrate to db/migrate in this project, not all models have specs that verify the
5
5
  # migrations (with have_db_column and have_db_index) and certain models may not be shared between metasploit-framework
6
6
  # and pro, so models may be removed in the future. Because of the unstable API the version should remain below 1.0.0
7
- VERSION = '0.16.8'
7
+ VERSION = '0.16.9'
8
8
  end
@@ -96,8 +96,9 @@ describe Mdm::Host do
96
96
 
97
97
  context 'associations' do
98
98
  it { should have_many(:creds).class_name('Mdm::Cred').through(:services) }
99
- it { should have_many(:exploit_attempts).class_name('Mdm::ExploitAttempt').dependent(:destroy) }
100
- it { should have_many(:exploited_hosts).class_name('Mdm::ExploitedHost').dependent(:destroy) }
99
+ it { should have_many(:clients).class_name('Mdm::Client').dependent(:destroy) }
100
+ it { should have_many(:exploit_attempts).class_name('Mdm::ExploitAttempt').dependent(:destroy) }
101
+ it { should have_many(:exploited_hosts).class_name('Mdm::ExploitedHost').dependent(:destroy) }
101
102
  it { should have_many(:host_details).class_name('Mdm::HostDetail').dependent(:destroy) }
102
103
  it { should have_many(:hosts_tags).class_name('Mdm::HostTag') }
103
104
  it { should have_many(:loots).class_name('Mdm::Loot').dependent(:destroy).order('loots.created_at DESC') }
@@ -149,7 +150,7 @@ describe Mdm::Host do
149
150
  end
150
151
 
151
152
  it 'should list unique Mdm::Module::Detail' do
152
- host.module_details.should =~ [module_detail]
153
+ expect(host.module_details).to match_array([module_detail])
153
154
  end
154
155
 
155
156
  it 'should have duplicate Mdm::Module::Details if collected through chain' do
@@ -22,7 +22,7 @@ describe Mdm::Module::Ref do
22
22
  end
23
23
 
24
24
  it 'should have refs in association' do
25
- module_ref.refs.should =~ [ref]
25
+ expect(module_ref.refs).to match_array([ref])
26
26
  end
27
27
  end
28
28
  end
@@ -20,7 +20,7 @@ describe Mdm::Ref do
20
20
  end
21
21
 
22
22
  it 'should have module_refs in assocation' do
23
- ref.module_refs.should =~ [module_ref]
23
+ expect(ref.module_refs).to match_array([module_ref])
24
24
  end
25
25
  end
26
26
  end
@@ -89,7 +89,7 @@ describe Mdm::Vuln do
89
89
  end
90
90
 
91
91
  it 'should list unique Mdm::Module::Detail' do
92
- vuln.module_details.should =~ [module_detail]
92
+ expect(vuln.module_details).to match_array([module_detail])
93
93
  end
94
94
 
95
95
  it 'should have duplicate Mdm::Module::Details if collected through chain' do
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: 0.16.8
4
+ version: 0.16.9
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: 2013-12-12 00:00:00.000000000 Z
14
+ date: 2013-12-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -456,7 +456,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
456
456
  version: '0'
457
457
  requirements: []
458
458
  rubyforge_project:
459
- rubygems_version: 2.1.9
459
+ rubygems_version: 2.1.11
460
460
  signing_key:
461
461
  specification_version: 4
462
462
  summary: Database code for MSF and Metasploit Pro