metasploit-credential 2.0.2 → 2.0.3
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/app/models/metasploit/credential/core.rb +12 -23
- data/app/models/metasploit/credential/login.rb +1 -1
- data/lib/metasploit/credential/version.rb +1 -1
- data/spec/dummy/config/database.yml +2 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f442d7c518fb88b5d296d632a798fa8251f79159
|
|
4
|
+
data.tar.gz: 580f1859d9614a66dc18ac39601469ac6a98fb3f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb6339e14224f2f123c9ee7c05da49c991fa1b2a9ec5e4c7cc568e0252c02f5025ea5981d91c5e47651291267751d799604528cd62c12249a1bc8f1985c22370
|
|
7
|
+
data.tar.gz: ec32a5757ef994c302f727e7fc4c5cdc5d898da74d65b65988f5dc76bcd3bfde33437fc624f3023e0ee90a56816f471f5cb762c25c2189def5fb91c10940e7c3
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
|
@@ -202,10 +202,12 @@ class Metasploit::Credential::Core < ActiveRecord::Base
|
|
|
202
202
|
# @scope Metasploit::Credential::Core
|
|
203
203
|
# @param host_id [Integer] the host to look up
|
|
204
204
|
# @return [ActiveRecord::Relation] that contains related Cores
|
|
205
|
-
scope :originating_host_id,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
scope :originating_host_id, ->(host_id) {
|
|
206
|
+
where(
|
|
207
|
+
Metasploit::Credential::Core[:id].in(
|
|
208
|
+
Metasploit::Credential::Core.cores_from_host(host_id)
|
|
209
|
+
)
|
|
210
|
+
)
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
# Finds Cores that are attached to a given workspace
|
|
@@ -269,31 +271,18 @@ class Metasploit::Credential::Core < ActiveRecord::Base
|
|
|
269
271
|
# Class Methods
|
|
270
272
|
#
|
|
271
273
|
|
|
272
|
-
#
|
|
274
|
+
# Provides UNIONing cores from a host via
|
|
273
275
|
# service origins or via session origins.
|
|
274
|
-
# TODO: Fix this in Rails 4. In Rails 3 there is a known bug that prevents
|
|
275
|
-
# .count from being called on the returned ActiveRecord::Relation.
|
|
276
|
-
# https://github.com/rails/rails/issues/939
|
|
277
276
|
# @param host_id [Integer]
|
|
278
277
|
# @return [String]
|
|
279
|
-
def self.
|
|
278
|
+
def self.cores_from_host(host_id)
|
|
280
279
|
left = origin_service_host_id(host_id).ast
|
|
281
280
|
right = origin_session_host_id(host_id).ast
|
|
282
281
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
right.orders = []
|
|
288
|
-
left.limit = nil
|
|
289
|
-
right.limit = nil
|
|
290
|
-
left.offset = nil
|
|
291
|
-
right.offset = nil
|
|
292
|
-
|
|
293
|
-
Arel::Nodes::Union.new(
|
|
294
|
-
origin_service_host_id(host_id).ast,
|
|
295
|
-
origin_session_host_id(host_id).ast
|
|
296
|
-
).to_sql
|
|
282
|
+
Arel::Nodes::UnionAll.new(
|
|
283
|
+
left,
|
|
284
|
+
right
|
|
285
|
+
)
|
|
297
286
|
end
|
|
298
287
|
|
|
299
288
|
#
|
|
@@ -192,7 +192,7 @@ class Metasploit::Credential::Login < ActiveRecord::Base
|
|
|
192
192
|
Metasploit::Credential::Core[:id].in(
|
|
193
193
|
# We are concerned with per-username access attempts. This
|
|
194
194
|
# can be across any of the cores on a host:
|
|
195
|
-
|
|
195
|
+
Metasploit::Credential::Core.cores_from_host(host_id)
|
|
196
196
|
).and(
|
|
197
197
|
Metasploit::Credential::Login[:status].in(
|
|
198
198
|
[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
development: &pgsql
|
|
2
2
|
adapter: postgresql
|
|
3
|
-
database: metasploit-
|
|
3
|
+
database: metasploit-credential_development1
|
|
4
4
|
username: msf
|
|
5
5
|
password: pass123
|
|
6
6
|
host: localhost
|
|
@@ -10,4 +10,4 @@ development: &pgsql
|
|
|
10
10
|
min_messages: warning
|
|
11
11
|
test:
|
|
12
12
|
<<: *pgsql
|
|
13
|
-
database: metasploit-
|
|
13
|
+
database: metasploit-credential_test1
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metasploit-credential
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luke Imhoff
|
|
@@ -86,7 +86,7 @@ cert_chain:
|
|
|
86
86
|
2SpuQH+SWteq3NXkAmFEEqvLJQ4sbptZt8OP8ghL3pVAvZNFmww/YVszSkShSzcg
|
|
87
87
|
QdihYCSEL2drS2cFd50jBeq71sxUtxbv82DUa2b+
|
|
88
88
|
-----END CERTIFICATE-----
|
|
89
|
-
date: 2016-05-
|
|
89
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
|
90
90
|
dependencies:
|
|
91
91
|
- !ruby/object:Gem::Dependency
|
|
92
92
|
name: metasploit-concern
|
metadata.gz.sig
CHANGED
|
Binary file
|