metasploit_data_models 0.19.7-java → 0.19.8-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/mdm/host.rb +0 -4
- data/config/locales/en.yml +34 -0
- data/lib/metasploit_data_models/version.rb +1 -1
- data/spec/app/models/mdm/host_spec.rb +27 -0
- data/spec/app/models/mdm/service_spec.rb +18 -1
- data/spec/app/models/mdm/tag_spec.rb +16 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3073e05c74aacb080050c62d8ce3ce1a19c7a366
|
4
|
+
data.tar.gz: 67045ea3db42de5194d722180fd3df66bd03bbbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98c1c8f390cb706a14049b0becab7138293688a03ff83b6bbfadec9abe2c86c3b8933e51ea7957c5f5b78df98d9e3097c38dd82e898b9925832add6ee866abda
|
7
|
+
data.tar.gz: 5e3b338af298769ded9ce74f3ebaa277537d52e0160e98e73bc111428b289ca3dbca690d5ed0430510481772082e2b9a19b2233510ecb50190f9b1531f0916f8
|
data/app/models/mdm/host.rb
CHANGED
data/config/locales/en.yml
CHANGED
@@ -1,4 +1,38 @@
|
|
1
1
|
en:
|
2
|
+
activerecord:
|
3
|
+
ancestors:
|
4
|
+
mdm/service:
|
5
|
+
search:
|
6
|
+
operator:
|
7
|
+
names:
|
8
|
+
info:
|
9
|
+
help: "Filters the results by service information or banners that contain the specified value."
|
10
|
+
name:
|
11
|
+
help: "Filters the results by service name."
|
12
|
+
proto:
|
13
|
+
help: "Filters the results by transport protocol."
|
14
|
+
port:
|
15
|
+
help: "Filters the results by port number."
|
16
|
+
mdm/host:
|
17
|
+
search:
|
18
|
+
operator:
|
19
|
+
names:
|
20
|
+
name:
|
21
|
+
help: "Filters the results by host name."
|
22
|
+
address:
|
23
|
+
help: "Filters the results by IP address or range."
|
24
|
+
os:
|
25
|
+
help: "Filters the results by operating system."
|
26
|
+
os_name:
|
27
|
+
help: "Filters the results by operating system."
|
28
|
+
mdm/tag:
|
29
|
+
search:
|
30
|
+
operator:
|
31
|
+
names:
|
32
|
+
name:
|
33
|
+
help: "Filters the results by tag."
|
34
|
+
desc:
|
35
|
+
help: "Filters the results by the description field of an associated tag."
|
2
36
|
metasploit:
|
3
37
|
model:
|
4
38
|
errors:
|
@@ -6,7 +6,7 @@ module MetasploitDataModels
|
|
6
6
|
# The minor version number, scoped to the {MAJOR} version number.
|
7
7
|
MINOR = 19
|
8
8
|
# The patch number, scoped to the {MINOR} version number.
|
9
|
-
PATCH =
|
9
|
+
PATCH = 8
|
10
10
|
|
11
11
|
# The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the `PRERELEASE` in the
|
12
12
|
# {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
|
@@ -846,4 +846,31 @@ describe Mdm::Host do
|
|
846
846
|
end
|
847
847
|
|
848
848
|
end
|
849
|
+
|
850
|
+
context 'search' do
|
851
|
+
let(:base_class) {
|
852
|
+
described_class
|
853
|
+
}
|
854
|
+
|
855
|
+
context 'attributes' do
|
856
|
+
|
857
|
+
it_should_behave_like 'search_with',
|
858
|
+
MetasploitDataModels::Search::Operator::IPAddress,
|
859
|
+
name: :address
|
860
|
+
it_should_behave_like 'search_attribute',
|
861
|
+
:name,
|
862
|
+
type: :string
|
863
|
+
it_should_behave_like 'search_with',
|
864
|
+
MetasploitDataModels::Search::Operator::Multitext,
|
865
|
+
name: :os,
|
866
|
+
operator_names: [
|
867
|
+
:os_name,
|
868
|
+
:os_flavor,
|
869
|
+
:os_sp
|
870
|
+
]
|
871
|
+
it_should_behave_like 'search_attribute',
|
872
|
+
:os_name,
|
873
|
+
type: :string
|
874
|
+
end
|
875
|
+
end
|
849
876
|
end
|
@@ -124,6 +124,23 @@ describe Mdm::Service do
|
|
124
124
|
described_class
|
125
125
|
}
|
126
126
|
|
127
|
+
context 'attributes' do
|
128
|
+
it_should_behave_like 'search_attribute',
|
129
|
+
:info,
|
130
|
+
type: :string
|
131
|
+
it_should_behave_like 'search_attribute',
|
132
|
+
:name,
|
133
|
+
type: :string
|
134
|
+
it_should_behave_like 'search_attribute',
|
135
|
+
:proto,
|
136
|
+
type: {
|
137
|
+
set: :string
|
138
|
+
}
|
139
|
+
it_should_behave_like 'search_with',
|
140
|
+
MetasploitDataModels::Search::Operator::Port::List,
|
141
|
+
name: :port
|
142
|
+
end
|
143
|
+
|
127
144
|
context 'associations' do
|
128
145
|
it_should_behave_like 'search_association', :host
|
129
146
|
end
|
@@ -137,4 +154,4 @@ describe Mdm::Service do
|
|
137
154
|
it { should validate_numericality_of(:port).only_integer }
|
138
155
|
it { should ensure_inclusion_of(:proto).in_array(described_class::PROTOS) }
|
139
156
|
end
|
140
|
-
end
|
157
|
+
end
|
@@ -97,4 +97,20 @@ describe Mdm::Tag do
|
|
97
97
|
}.to change(Mdm::Tag, :count).by(-1)
|
98
98
|
end
|
99
99
|
end
|
100
|
+
|
101
|
+
|
102
|
+
context 'search' do
|
103
|
+
let(:base_class) {
|
104
|
+
described_class
|
105
|
+
}
|
106
|
+
|
107
|
+
context 'attributes' do
|
108
|
+
it_should_behave_like 'search_attribute',
|
109
|
+
:name,
|
110
|
+
type: :string
|
111
|
+
it_should_behave_like 'search_attribute',
|
112
|
+
:desc,
|
113
|
+
type: :string
|
114
|
+
end
|
115
|
+
end
|
100
116
|
end
|