metasploit_data_models 0.19.7 → 0.19.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjIzZmZkYmUxMzhmMjg5ZDA0Y2M1MmU2NTgyNjQ2YTRlYzc3OWZhYg==
4
+ ZTliNWVjZmJlNWVlMzdiNGFjYTU0ZTlmOTcxNGE1MWM1MWUwYjFkZQ==
5
5
  data.tar.gz: !binary |-
6
- NTc2M2QyZjZhOTZiMGQyNDJlOWRjNmEyMzdhY2E0NzQ2NTgwOGMzMg==
6
+ ODNmNTYzNjQxYzRhM2Q1ZGY3ZGFiMTFkZGIzZGUyY2RlY2Y1ZDQ0Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjQwNTdkNTBhZTdlNWZjZTJlYjc3ZjA2MTA1ODBkMTEyNDZlM2I5YjBlN2Qw
10
- YWY4ZjZhZDA0ZmRiOWQ1MDY1NWEyZGY4MWFkMDc1YzhlYjRkNThjN2NhOGRk
11
- MjJjMzEyM2U1MDU2ZmZmYjQzZGQyOGRiMTg3N2E4YjhlNDRiOWE=
9
+ MGRlNTBiZWYyODEwMjAwYTBhY2FiYTM5NjBkZmJhYjcyYTdmZjhhNzQ5NDMx
10
+ Y2JlY2NmYmMwNDhiMzY2NjQ1MzU1ZTI2ZTRiNjk1NjhlYzYzNmJmOTI3YmQ2
11
+ MGVlNWI5NWIwMDZjM2M4NTRkNzQ4ZmQxOTJjNGNlZDQ4ZmQ5Y2Q=
12
12
  data.tar.gz: !binary |-
13
- NTUzODYwOWJmMTliMzkzMjhjOGY2NTRmNGExNzgzNzc1YmJmODI2MDYyODZl
14
- NjMwYmIyMWVkN2YxYTZiZjhhNzAwNDJhZDg3N2ZjYTdhZDQ4OWUyMjgxNWE4
15
- NjhkZGE2YjU0MGFlYTY0OTM0NTdjOTMwYTZmNzE0Y2ZlMzFmMGQ=
13
+ NTEyZDUyYjZkYThmZmQ5YTE5YjNiYTkxNzQ0NDE5NjQxY2I1Zjk0ODUxNDM0
14
+ ZmFhZjg4ZjYyMDZmNWEwYTA4NDEwZDE1NDY2MDNjZDllMDM2YzJhZjhjOWJh
15
+ OTFlZDY0MmY1NjBiZTMwMDJiMmYwMDY3YWY4Nzk0NGY4ZTRiMDk=
@@ -519,10 +519,6 @@ class Mdm::Host < ActiveRecord::Base
519
519
  :os_sp
520
520
  ]
521
521
 
522
- #
523
- # Search Withs
524
- #
525
-
526
522
  search_with MetasploitDataModels::Search::Operator::IPAddress,
527
523
  attribute: :address
528
524
 
@@ -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 = 7
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
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.19.7
4
+ version: 0.19.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Huckins