metasploit-credential 4.0.0 → 4.0.5

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56d3f12b32ff69edc1d61dcfe44578abf1d039679320ad45e1109b7180038d11
4
- data.tar.gz: 014e0d05a2983eb3c94f211930c55434ae789af5232ab58c18741057c865bc49
3
+ metadata.gz: 8f44e3ef41e9c80b840bd093c0dbb357c605adb7954226b7ce0a705f86387c08
4
+ data.tar.gz: a2bb39f5ac6b1d299b64c8f0a58b207ba19b30a8cdbf6f098b7429f6201b1aea
5
5
  SHA512:
6
- metadata.gz: d1264f5666b467b40ae7e24da2cecae6ee57cef12a4b087bb9db8e8b7914518a389da59e2e102ae8f9d6efb6229e84a1dee371d7d17ff302650558c78dc8f75f
7
- data.tar.gz: a7ab4645c7c03e282afcfc691bf746d08ea8e2b2dc2d7c1014b6fd3b61b772049ab105b0b4019f4b70622099c946fa8d7dc9f907e3edabc788dc6fd782d9490c
6
+ metadata.gz: da4a4005c2ab04e21e3c63237515f44e5f2f5ef2b6b9e0913f1b229d52c69d377a4d931700672ec292a8e15f9530359512c800dd0d0bcc8bb1efd3d27178f09f
7
+ data.tar.gz: cb8e628f924ff529fc8a964c247cbf9f94a13fcc488a67986f64b9a48af9c1b7e3a07422abd1f989a9057a3209d375051dce7065f28c216ce8a22118447e3ba8
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Metasploit::Credential [![Build Status](https://travis-ci.org/rapid7/metasploit-credential.svg?branch=master)](https://travis-ci.org/rapid7/metasploit-credential)[![Code Climate](https://codeclimate.com/github/rapid7/metasploit-credential.png)](https://codeclimate.com/github/rapid7/metasploit-credential)[![Dependency Status](https://gemnasium.com/rapid7/metasploit-credential.svg)](https://gemnasium.com/rapid7/metasploit-credential)[![Gem Version](https://badge.fury.io/rb/metasploit-credential.svg)](http://badge.fury.io/rb/metasploit-credential)[![Inline docs](http://inch-ci.org/github/rapid7/metasploit-credential.svg)](http://inch-ci.org/github/rapid7/metasploit-credential)[![PullReview stats](https://www.pullreview.com/github/rapid7/metasploit-credential/badges/master.svg)](https://www.pullreview.com/github/rapid7/metasploit-credential/reviews/master)
1
+ # Metasploit::Credential [![Build Status](https://github.com/rapid7/metasploit-credential/actions/workflows/verify.yml/badge.svg)](https://github.com/rapid7/metasploit-credential/actions/workflows/verify.yml)[![Code Climate](https://codeclimate.com/github/rapid7/metasploit-credential.png)](https://codeclimate.com/github/rapid7/metasploit-credential)[![Dependency Status](https://gemnasium.com/rapid7/metasploit-credential.svg)](https://gemnasium.com/rapid7/metasploit-credential)[![Gem Version](https://badge.fury.io/rb/metasploit-credential.svg)](http://badge.fury.io/rb/metasploit-credential)[![Inline docs](http://inch-ci.org/github/rapid7/metasploit-credential.svg)](http://inch-ci.org/github/rapid7/metasploit-credential)[![PullReview stats](https://www.pullreview.com/github/rapid7/metasploit-credential/badges/master.svg)](https://www.pullreview.com/github/rapid7/metasploit-credential/reviews/master)
2
2
 
3
3
  ## Versioning
4
4
 
@@ -98,7 +98,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)
98
98
  ### Dependencies
99
99
 
100
100
  Remove your `Gemfile.lock` so you test with the latest compatible dependencies as will be done on
101
- [travis-ci](https://travis-ci.org/rapid7/metasploit-credential)
101
+ [github actions](https://github.com/rapid7/metasploit-credential/actions/workflows/verify.yml)
102
102
 
103
103
  rm Gemfile.lock
104
104
  bundle install
@@ -276,8 +276,8 @@ class Metasploit::Credential::Core < ApplicationRecord
276
276
  # @param host_id [Integer]
277
277
  # @return [String]
278
278
  def self.cores_from_host(host_id)
279
- left = origin_service_host_id(host_id).ast
280
- right = origin_session_host_id(host_id).ast
279
+ left = origin_service_host_id(host_id).arel.ast
280
+ right = origin_session_host_id(host_id).arel.ast
281
281
 
282
282
  Arel::Nodes::UnionAll.new(
283
283
  left,
@@ -125,7 +125,7 @@ module Metasploit::Credential::EntityRelationshipDiagram
125
125
  # @return [Array<Set<Class<ApplicationRecord>>>]
126
126
  def self.maximal_clusters
127
127
  clusters = cluster_by_class.values
128
- unique_clusters = clusters.distinct
128
+ unique_clusters = clusters.uniq
129
129
 
130
130
  maximal_clusters = unique_clusters.dup
131
131
  cluster_queue = unique_clusters.dup
@@ -154,7 +154,7 @@ class Metasploit::Credential::Exporter::Pwdump
154
154
  # @param hash_array [Array<Metasploit::Credential::Login>]
155
155
  # @return [Fixnum]
156
156
  def service_count_for_hashes(hash_array)
157
- hash_array.collect(&:service).collect(&:id).distinct.size
157
+ hash_array.collect(&:service).collect(&:id).uniq.size
158
158
  end
159
159
 
160
160
  private
@@ -3,7 +3,7 @@
3
3
  module Metasploit
4
4
  module Credential
5
5
  # VERSION is managed by GemRelease
6
- VERSION = '4.0.0'
6
+ VERSION = '4.0.5'
7
7
 
8
8
  # @return [String]
9
9
  #
@@ -1,6 +1,6 @@
1
1
  development: &pgsql
2
2
  adapter: postgresql
3
- database: metasploit-credential_development0
3
+ database: metasploit-credential_development3
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-credential_test0
13
+ database: metasploit-credential_test3
@@ -1,17 +1,16 @@
1
- # @note This file is only for use in travis-ci. If you need to make a `spec/dummy/config/database.yml` for running
1
+ # @note This file is only for use in github actions. If you need to make a `spec/dummy/config/database.yml` for running
2
2
  # rake, rake spec, or rspec locally, please customize `spec/dummy/config/database.yml.example`.
3
3
  #
4
4
  # @example Customizing config/database.yml.example
5
5
  # cp spec/dummy/config/database.yml.example spec/dummy/config/database.yml
6
6
  # # update password fields for each environment's user
7
7
 
8
- # Using the postgres user locally without a host and port is the supported configuration from Travis-CI
9
- #
10
- # @see http://about.travis-ci.org/docs/user/database-setup/#PostgreSQL
11
8
  development: &pgsql
12
9
  adapter: postgresql
13
10
  database: metasploit_credential_development
11
+ host: localhost
14
12
  username: postgres
13
+ password: postgres
15
14
  pool: 5
16
15
  timeout: 5
17
16
 
@@ -19,4 +18,4 @@ development: &pgsql
19
18
  # `rake`. Do not set this db to the same as development or production.
20
19
  test:
21
20
  <<: *pgsql
22
- database: metasploit_credential_test
21
+ database: metasploit_credential_test
@@ -55,8 +55,7 @@ RSpec.describe Metasploit::Credential::Creation do
55
55
  origin_type: origin_type,
56
56
  username: 'admin',
57
57
  private_data: 'password',
58
- private_type: :password,
59
- workspace_id: workspace.id
58
+ private_type: :password
60
59
  }.merge(origin_data[origin_type])}
61
60
  it 'creates a credential core' do
62
61
  expect{ test_object.create_credential(credential_data) }.to change{ Metasploit::Credential::Core.count }.by(1)
@@ -89,8 +88,7 @@ RSpec.describe Metasploit::Credential::Creation do
89
88
  origin_type: :manual,
90
89
  username: 'admin',
91
90
  private_data: 'password',
92
- private_type: :password,
93
- workspace_id: workspace.id
91
+ private_type: :password
94
92
  }}
95
93
  it 'creates a credential core' do
96
94
  expect{ test_object.create_credential(credential_data) }.to change{ Metasploit::Credential::Core.count }.by(1)
@@ -117,8 +115,7 @@ RSpec.describe Metasploit::Credential::Creation do
117
115
  origin_type: :manual,
118
116
  username: public_value,
119
117
  private_data: 'password',
120
- private_type: :password,
121
- workspace_id: workspace.id
118
+ private_type: :password
122
119
  }}
123
120
  it 'creates a credential core' do
124
121
  expect{ test_object.create_credential(credential_data) }.to change{ Metasploit::Credential::Core.count }.by(1)
@@ -158,8 +155,7 @@ RSpec.describe Metasploit::Credential::Creation do
158
155
  origin_type: :manual,
159
156
  username: 'admin',
160
157
  private_data: private_data[private_type],
161
- private_type: private_type,
162
- workspace_id: workspace.id
158
+ private_type: private_type
163
159
  }}
164
160
  it 'creates a credential core' do
165
161
  expect{ test_object.create_credential(credential_data) }.to change{ Metasploit::Credential::Core.count }.by(1)
@@ -213,7 +209,6 @@ RSpec.describe Metasploit::Credential::Creation do
213
209
  username: 'admin',
214
210
  private_data: 'password',
215
211
  private_type: :password,
216
- workspace_id: workspace.id,
217
212
  address: service.host.address,
218
213
  port: service.port,
219
214
  service_name: service.name,
@@ -256,7 +251,6 @@ RSpec.describe Metasploit::Credential::Creation do
256
251
  username: 'admin',
257
252
  private_data: 'password',
258
253
  private_type: :password,
259
- workspace_id: workspace.id,
260
254
  address: service.host.address,
261
255
  port: service.port,
262
256
  service_name: service.name,
@@ -294,7 +288,6 @@ RSpec.describe Metasploit::Credential::Creation do
294
288
  username: public_value,
295
289
  private_data: 'password',
296
290
  private_type: :password,
297
- workspace_id: workspace.id,
298
291
  address: service.host.address,
299
292
  port: service.port,
300
293
  service_name: service.name,
@@ -344,7 +337,6 @@ RSpec.describe Metasploit::Credential::Creation do
344
337
  username: 'admin',
345
338
  private_data: private_data[private_type],
346
339
  private_type: private_type,
347
- workspace_id: workspace.id,
348
340
  address: service.host.address,
349
341
  port: service.port,
350
342
  service_name: service.name,
@@ -29,7 +29,7 @@ RSpec.describe Metasploit::Credential::Exporter::Core do
29
29
  describe "#export!" do
30
30
  it 'should create the zipfile' do
31
31
  core_exporter.export!
32
- expect(File.exists?(core_exporter.output_zipfile_path)).to eq(true)
32
+ expect(File.exist?(core_exporter.output_zipfile_path)).to eq(true)
33
33
  end
34
34
 
35
35
  it 'should output to a directory whose name contains the standardized identifier' do
@@ -452,4 +452,4 @@ RSpec.describe Metasploit::Credential::Exporter::Core do
452
452
  end
453
453
  end
454
454
  end
455
- end
455
+ end
data/spec/spec_helper.rb CHANGED
@@ -9,14 +9,8 @@ Bundler.setup(:default, :test)
9
9
  # Require simplecov before loading ..dummy/config/environment.rb because it will cause metasploit-credential/lib to
10
10
  # be loaded, which would result in Coverage not recording hits for any of the files.
11
11
  require 'simplecov'
12
- require 'coveralls'
13
12
 
14
- if ENV['TRAVIS'] == 'true'
15
- # don't generate local report as it is inaccessible on travis-ci, which is why coveralls is being used.
16
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
17
- else
18
- SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
19
- end
13
+ SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
20
14
 
21
15
  require File.expand_path("../dummy/config/environment", __FILE__)
22
16
  require 'rspec/rails'
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit-credential
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.5
5
5
  platform: ruby
6
6
  authors:
7
- - Luke Imhoff
8
- - Trevor Rosen
7
+ - Metasploit Hackers
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
@@ -65,20 +64,20 @@ cert_chain:
65
64
  -----END CERTIFICATE-----
66
65
  - |
67
66
  -----BEGIN CERTIFICATE-----
68
- MIIFIzCCBAugAwIBAgIQDX9ZkVJ2eNVTlibR5ALyJTANBgkqhkiG9w0BAQsFADBy
67
+ MIIFIzCCBAugAwIBAgIQCMePMbkSxvnPeJhYXIfaxzANBgkqhkiG9w0BAQsFADBy
69
68
  MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
70
69
  d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQg
71
- SUQgQ29kZSBTaWduaW5nIENBMB4XDTE5MTAxNjAwMDAwMFoXDTIwMTAxOTEyMDAw
70
+ SUQgQ29kZSBTaWduaW5nIENBMB4XDTIwMTAwNzAwMDAwMFoXDTIzMTEwNjEyMDAw
72
71
  MFowYDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNV
73
72
  BAcTBkJvc3RvbjETMBEGA1UEChMKUmFwaWQ3IExMQzETMBEGA1UEAxMKUmFwaWQ3
74
- IExMQzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANHnKegPAghKuZk4
75
-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9TVs0
93
+ EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
+ 9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
96
95
  -----END CERTIFICATE-----
97
- date: 2020-02-06 00:00:00.000000000 Z
96
+ date: 2021-04-29 00:00:00.000000000 Z
98
97
  dependencies:
99
98
  - !ruby/object:Gem::Dependency
100
99
  name: metasploit-concern
@@ -224,8 +223,7 @@ dependencies:
224
223
  version: '0'
225
224
  description: The Metasploit::Credential namespace and its ActiveRecord::Base subclasses
226
225
  email:
227
- - luke_imhoff@rapid7.com
228
- - trevor_rosen@rapid7.com
226
+ - msfdev@metasploit.com
229
227
  executables: []
230
228
  extensions: []
231
229
  extra_rdoc_files: []
@@ -330,7 +328,7 @@ files:
330
328
  - spec/dummy/config/boot.rb
331
329
  - spec/dummy/config/database.yml
332
330
  - spec/dummy/config/database.yml.example
333
- - spec/dummy/config/database.yml.travis
331
+ - spec/dummy/config/database.yml.github_actions
334
332
  - spec/dummy/config/environment.rb
335
333
  - spec/dummy/config/environments/development.rb
336
334
  - spec/dummy/config/environments/production.rb
@@ -429,7 +427,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
429
427
  requirements:
430
428
  - - ">="
431
429
  - !ruby/object:Gem::Version
432
- version: 2.2.0
430
+ version: 2.4.0
433
431
  required_rubygems_version: !ruby/object:Gem::Requirement
434
432
  requirements:
435
433
  - - ">="
@@ -458,7 +456,7 @@ test_files:
458
456
  - spec/dummy/config/boot.rb
459
457
  - spec/dummy/config/database.yml
460
458
  - spec/dummy/config/database.yml.example
461
- - spec/dummy/config/database.yml.travis
459
+ - spec/dummy/config/database.yml.github_actions
462
460
  - spec/dummy/config/environment.rb
463
461
  - spec/dummy/config/environments/development.rb
464
462
  - spec/dummy/config/environments/production.rb
metadata.gz.sig CHANGED
Binary file