metasploit_data_models 0.17.0-java → 0.17.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/Gemfile +6 -1
- data/app/models/mdm/client.rb +3 -1
- data/app/models/mdm/cred.rb +7 -2
- data/app/models/mdm/event.rb +7 -2
- data/app/models/mdm/exploit_attempt.rb +43 -2
- data/app/models/mdm/exploited_host.rb +7 -2
- data/app/models/mdm/host.rb +85 -49
- data/app/models/mdm/host_detail.rb +4 -1
- data/app/models/mdm/host_tag.rb +41 -3
- data/app/models/mdm/listener.rb +7 -2
- data/app/models/mdm/loot.rb +25 -3
- data/app/models/mdm/nexpose_console.rb +13 -0
- data/app/models/mdm/note.rb +10 -3
- data/app/models/mdm/ref.rb +4 -2
- data/app/models/mdm/route.rb +7 -1
- data/app/models/mdm/service.rb +71 -28
- data/app/models/mdm/session.rb +28 -3
- data/app/models/mdm/session_event.rb +3 -1
- data/app/models/mdm/tag.rb +29 -10
- data/app/models/mdm/task.rb +56 -17
- data/app/models/mdm/task_cred.rb +7 -3
- data/app/models/mdm/task_host.rb +7 -3
- data/app/models/mdm/task_service.rb +7 -3
- data/app/models/mdm/task_session.rb +7 -2
- data/app/models/mdm/user.rb +9 -2
- data/app/models/mdm/vuln.rb +27 -7
- data/app/models/mdm/vuln_attempt.rb +37 -2
- data/app/models/mdm/vuln_detail.rb +9 -1
- data/app/models/mdm/vuln_ref.rb +7 -2
- data/app/models/mdm/web_form.rb +3 -1
- data/app/models/mdm/web_page.rb +3 -1
- data/app/models/mdm/web_site.rb +19 -4
- data/app/models/mdm/web_vuln.rb +3 -1
- data/lib/metasploit_data_models/version.rb +1 -1
- data/lib/tasks/yard.rake +7 -0
- data/metasploit_data_models.gemspec +3 -1
- data/spec/app/models/mdm/host_spec.rb +0 -67
- data/spec/app/models/mdm/host_tag_spec.rb +38 -7
- data/spec/app/models/mdm/tag_spec.rb +5 -23
- metadata +9 -3
@@ -66,23 +66,6 @@ describe Mdm::Tag do
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
context 'callbacks' do
|
70
|
-
context 'before_destroy' do
|
71
|
-
it 'should call #cleanup_hosts' do
|
72
|
-
mytag = FactoryGirl.create(:mdm_tag)
|
73
|
-
mytag.should_receive(:cleanup_hosts)
|
74
|
-
mytag.destroy
|
75
|
-
end
|
76
|
-
|
77
|
-
it 'should destroy the host_tag joins' do
|
78
|
-
mytag = FactoryGirl.create(:mdm_tag)
|
79
|
-
FactoryGirl.create(:mdm_host_tag, :tag => mytag)
|
80
|
-
Mdm::HostTag.should_receive(:delete_all).with("tag_id = #{mytag.id}")
|
81
|
-
mytag.destroy
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
69
|
context 'instance methods' do
|
87
70
|
context '#to_s' do
|
88
71
|
it 'should return the name of the tag as a string' do
|
@@ -103,15 +86,14 @@ describe Mdm::Tag do
|
|
103
86
|
end
|
104
87
|
|
105
88
|
context '#destroy' do
|
89
|
+
let!(:tag) do
|
90
|
+
FactoryGirl.create(:mdm_tag)
|
91
|
+
end
|
92
|
+
|
106
93
|
it 'should successfully destroy the object' do
|
107
|
-
tag = FactoryGirl.create(:mdm_tag)
|
108
94
|
expect {
|
109
95
|
tag.destroy
|
110
|
-
}.
|
111
|
-
expect {
|
112
|
-
tag.reload
|
113
|
-
}.to raise_error(ActiveRecord::RecordNotFound)
|
96
|
+
}.to change(Mdm::Tag, :count).by(-1)
|
114
97
|
end
|
115
98
|
end
|
116
|
-
|
117
99
|
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: 0.17.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: java
|
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: 2014-
|
14
|
+
date: 2014-05-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|
@@ -62,11 +62,17 @@ dependencies:
|
|
62
62
|
- - '>='
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: 3.2.13
|
65
|
+
- - <
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 4.0.0
|
65
68
|
requirement: !ruby/object:Gem::Requirement
|
66
69
|
requirements:
|
67
70
|
- - '>='
|
68
71
|
- !ruby/object:Gem::Version
|
69
72
|
version: 3.2.13
|
73
|
+
- - <
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 4.0.0
|
70
76
|
prerelease: false
|
71
77
|
type: :runtime
|
72
78
|
- !ruby/object:Gem::Dependency
|
@@ -464,7 +470,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
464
470
|
version: '0'
|
465
471
|
requirements: []
|
466
472
|
rubyforge_project:
|
467
|
-
rubygems_version: 2.
|
473
|
+
rubygems_version: 2.2.2
|
468
474
|
signing_key:
|
469
475
|
specification_version: 4
|
470
476
|
summary: Database code for MSF and Metasploit Pro
|