metasploit-credential 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/app/models/metasploit/credential/core.rb +2 -2
  5. data/lib/metasploit/credential/version.rb +1 -1
  6. data/lib/tasks/databases.rake +1 -0
  7. data/spec/dummy/bin/bundle +3 -0
  8. data/spec/dummy/bin/rails +4 -0
  9. data/spec/dummy/bin/rake +4 -0
  10. data/spec/dummy/config/application.rb +1 -1
  11. data/spec/dummy/config/boot.rb +3 -9
  12. data/spec/dummy/config/database.yml +2 -2
  13. data/spec/dummy/config/environment.rb +3 -3
  14. data/spec/dummy/config/environments/development.rb +18 -8
  15. data/spec/dummy/config/environments/production.rb +40 -28
  16. data/spec/dummy/config/environments/test.rb +15 -14
  17. data/spec/dummy/config/initializers/assets.rb +8 -0
  18. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  19. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  20. data/spec/dummy/config/initializers/inflections.rb +6 -5
  21. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  22. data/spec/dummy/config/initializers/session_store.rb +1 -6
  23. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  24. data/spec/dummy/config/routes.rb +23 -25
  25. data/spec/dummy/db/structure.sql +87 -84
  26. data/spec/lib/metasploit/credential/creation_spec.rb +1 -1
  27. data/spec/lib/metasploit/credential/exporter/core_spec.rb +1 -1
  28. data/spec/lib/metasploit/credential/exporter/pwdump_spec.rb +1 -1
  29. data/spec/lib/metasploit/credential/importer/core_spec.rb +1 -1
  30. data/spec/lib/metasploit/credential/importer/multi_spec.rb +1 -1
  31. data/spec/lib/metasploit/credential/importer/pwdump_spec.rb +1 -1
  32. data/spec/lib/metasploit/credential/importer/zip_spec.rb +1 -1
  33. data/spec/lib/metasploit/credential/migrator_spec.rb +1 -1
  34. data/spec/models/metasploit/credential/core_spec.rb +1 -1
  35. data/spec/models/metasploit/credential/login_spec.rb +6 -6
  36. data/spec/models/metasploit/credential/origin/import_spec.rb +1 -1
  37. data/spec/models/metasploit/credential/origin/service_spec.rb +1 -1
  38. data/spec/models/metasploit/credential/origin/session_spec.rb +2 -2
  39. data/spec/models/metasploit_data_models/search/visitor/relation_spec.rb +2 -2
  40. metadata +30 -20
  41. metadata.gz.sig +0 -0
  42. data/spec/support/shared/contexts/mdm/workspace.rb +0 -6
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Metasploit::Credential::Creation do
2
- include_context 'Mdm::Workspace'
2
+
3
3
  let(:dummy_class) {
4
4
  Class.new do
5
5
  include Metasploit::Credential::Creation
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Metasploit::Credential::Exporter::Core do
2
- include_context 'Mdm::Workspace'
2
+
3
3
  include_context 'export objects'
4
4
 
5
5
 
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Metasploit::Credential::Exporter::Pwdump do
2
- include_context 'Mdm::Workspace'
2
+
3
3
 
4
4
  subject(:exporter){ Metasploit::Credential::Exporter::Pwdump.new}
5
5
 
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Metasploit::Credential::Importer::Core do
2
- include_context 'Mdm::Workspace'
2
+
3
3
  let(:workspace){FactoryGirl.create(:mdm_workspace)}
4
4
 
5
5
  subject(:core_csv_importer){FactoryGirl.build(:metasploit_credential_core_importer, workspace:workspace)}
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Metasploit::Credential::Importer::Multi do
2
- include_context 'Mdm::Workspace'
2
+
3
3
  include_context 'metasploit_credential_importer_zip_file'
4
4
 
5
5
  UNSUPPORTED_FILE = 'bad.txt'
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Metasploit::Credential::Importer::Pwdump do
2
- include_context 'Mdm::Workspace'
2
+
3
3
 
4
4
  let(:workspace) {FactoryGirl.create(:mdm_workspace)}
5
5
  let(:origin) { FactoryGirl.create(:metasploit_credential_origin_import) }
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Metasploit::Credential::Importer::Zip do
2
- include_context 'Mdm::Workspace'
2
+
3
3
  include_context 'metasploit_credential_importer_zip_file'
4
4
 
5
5
  let(:workspace){FactoryGirl.create(:mdm_workspace)}
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'tempfile'
3
3
 
4
4
  RSpec.describe Metasploit::Credential::Migrator do
5
- include_context 'Mdm::Workspace'
5
+
6
6
 
7
7
  let(:workspace){ FactoryGirl.create(:mdm_workspace) }
8
8
  let(:host){ FactoryGirl.create(:mdm_host, workspace: workspace)}
@@ -53,7 +53,7 @@
53
53
  # complete | non-nil | non-nil | non-nil | non-nil | different | different | different | different | FALSE |
54
54
  #
55
55
  RSpec.describe Metasploit::Credential::Core, type: :model do
56
- include_context 'Mdm::Workspace'
56
+
57
57
 
58
58
  subject(:core) do
59
59
  described_class.new
@@ -10,7 +10,7 @@ RSpec.describe Metasploit::Credential::Login, type: :model do
10
10
  context 'callbacks' do
11
11
  context 'before_valiation' do
12
12
  context '#blank_to_nil' do
13
- include_context 'Mdm::Workspace'
13
+
14
14
 
15
15
  let(:login) do
16
16
  FactoryGirl.build(
@@ -83,7 +83,7 @@ RSpec.describe Metasploit::Credential::Login, type: :model do
83
83
  end
84
84
 
85
85
  context 'factories' do
86
- include_context 'Mdm::Workspace'
86
+
87
87
 
88
88
  context 'metasploit_credential_login' do
89
89
  subject(:metasploit_credential_login) do
@@ -180,7 +180,7 @@ RSpec.describe Metasploit::Credential::Login, type: :model do
180
180
  it { is_expected.to validate_presence_of :core }
181
181
 
182
182
  context 'with existent Metasploit::Credential::Login' do
183
- include_context 'Mdm::Workspace'
183
+
184
184
 
185
185
  before(:example) do
186
186
  # validate_uniqueness_of will use Metasploit::Credential::Login#service_id and not trigger service_id non-null
@@ -197,7 +197,7 @@ RSpec.describe Metasploit::Credential::Login, type: :model do
197
197
  it { is_expected.to validate_inclusion_of(:status).in_array(Metasploit::Model::Login::Status::ALL) }
198
198
 
199
199
  context '#consistent_last_attempted_at' do
200
- include_context 'Mdm::Workspace'
200
+
201
201
 
202
202
  subject(:last_attempted_at_errors) do
203
203
  login.errors[:last_attempted_at]
@@ -283,7 +283,7 @@ RSpec.describe Metasploit::Credential::Login, type: :model do
283
283
  end
284
284
 
285
285
  context '#consistent_workspaces' do
286
- include_context 'Mdm::Workspace'
286
+
287
287
 
288
288
  subject(:workspace_errors) do
289
289
  login.errors[:base]
@@ -498,7 +498,7 @@ RSpec.describe Metasploit::Credential::Login, type: :model do
498
498
  end
499
499
 
500
500
  context "scopes" do
501
- include_context 'Mdm::Workspace'
501
+
502
502
 
503
503
  context "::in_workspace_with_hosts_and_services" do
504
504
  let(:service){ FactoryGirl.create :mdm_service }
@@ -25,7 +25,7 @@ RSpec.describe Metasploit::Credential::Origin::Import, type: :model do
25
25
  end
26
26
 
27
27
  context 'factories' do
28
- include_context 'Mdm::Workspace'
28
+
29
29
 
30
30
  subject(:metasploit_credential_origin_import) do
31
31
  FactoryGirl.build(:metasploit_credential_origin_import)
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe Metasploit::Credential::Origin::Service, type: :model do
4
- include_context 'Mdm::Workspace'
4
+
5
5
 
6
6
  subject(:service_origin) do
7
7
  FactoryGirl.build(:metasploit_credential_origin_service)
@@ -24,7 +24,7 @@ RSpec.describe Metasploit::Credential::Origin::Session, type: :model do
24
24
 
25
25
  context 'factories' do
26
26
  context 'metasploit_credential_origin_session' do
27
- include_context 'Mdm::Workspace'
27
+
28
28
 
29
29
  subject(:metasploit_credential_origin_session) do
30
30
  FactoryGirl.build(:metasploit_credential_origin_session)
@@ -36,7 +36,7 @@ RSpec.describe Metasploit::Credential::Origin::Session, type: :model do
36
36
 
37
37
  context 'validations' do
38
38
  context 'post_reference_name' do
39
- include_context 'Mdm::Workspace'
39
+
40
40
 
41
41
  before(:example) do
42
42
  FactoryGirl.create(:metasploit_credential_origin_session)
@@ -19,7 +19,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
19
19
 
20
20
  context 'MetasploitDataModels::Search::Visitor::Relation#query Metasploit::Model::Search::Query#klass' do
21
21
  context 'with Metasploit::Credential::Core' do
22
- include_context 'Mdm::Workspace'
22
+
23
23
 
24
24
  #
25
25
  # Shared Examples
@@ -283,7 +283,7 @@ RSpec.describe MetasploitDataModels::Search::Visitor::Relation, type: :model do
283
283
  end
284
284
 
285
285
  context 'with Metasploit::Credential::Login' do
286
- include_context 'Mdm::Workspace'
286
+
287
287
  include_context 'Rex::Text'
288
288
 
289
289
  #
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: 1.1.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Imhoff
@@ -86,50 +86,50 @@ cert_chain:
86
86
  2SpuQH+SWteq3NXkAmFEEqvLJQ4sbptZt8OP8ghL3pVAvZNFmww/YVszSkShSzcg
87
87
  QdihYCSEL2drS2cFd50jBeq71sxUtxbv82DUa2b+
88
88
  -----END CERTIFICATE-----
89
- date: 2016-03-08 00:00:00.000000000 Z
89
+ date: 2016-05-12 00:00:00.000000000 Z
90
90
  dependencies:
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: metasploit-concern
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
- version: '1.1'
97
+ version: '0'
98
98
  type: :runtime
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - "~>"
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: '1.1'
104
+ version: '0'
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: metasploit_data_models
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - "~>"
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
- version: '1.3'
111
+ version: '0'
112
112
  type: :runtime
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
- version: '1.3'
118
+ version: '0'
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: metasploit-model
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - "~>"
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: '1.1'
125
+ version: '0'
126
126
  type: :runtime
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - "~>"
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
- version: '1.1'
132
+ version: '0'
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: railties
135
135
  requirement: !ruby/object:Gem::Requirement
@@ -162,16 +162,16 @@ dependencies:
162
162
  name: rubyzip
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - "~>"
165
+ - - ">="
166
166
  - !ruby/object:Gem::Version
167
- version: '1.1'
167
+ version: '0'
168
168
  type: :runtime
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - "~>"
172
+ - - ">="
173
173
  - !ruby/object:Gem::Version
174
- version: '1.1'
174
+ version: '0'
175
175
  - !ruby/object:Gem::Dependency
176
176
  name: pg
177
177
  requirement: !ruby/object:Gem::Requirement
@@ -283,6 +283,9 @@ files:
283
283
  - spec/dummy/app/controllers/application_controller.rb
284
284
  - spec/dummy/app/helpers/application_helper.rb
285
285
  - spec/dummy/app/views/layouts/application.html.erb
286
+ - spec/dummy/bin/bundle
287
+ - spec/dummy/bin/rails
288
+ - spec/dummy/bin/rake
286
289
  - spec/dummy/config.ru
287
290
  - spec/dummy/config/application.rb
288
291
  - spec/dummy/config/boot.rb
@@ -293,7 +296,10 @@ files:
293
296
  - spec/dummy/config/environments/development.rb
294
297
  - spec/dummy/config/environments/production.rb
295
298
  - spec/dummy/config/environments/test.rb
299
+ - spec/dummy/config/initializers/assets.rb
296
300
  - spec/dummy/config/initializers/backtrace_silencers.rb
301
+ - spec/dummy/config/initializers/cookies_serializer.rb
302
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
297
303
  - spec/dummy/config/initializers/inflections.rb
298
304
  - spec/dummy/config/initializers/mime_types.rb
299
305
  - spec/dummy/config/initializers/secret_token.rb
@@ -365,7 +371,6 @@ files:
365
371
  - spec/models/metasploit_data_models/search/visitor/relation_spec.rb
366
372
  - spec/spec_helper.rb
367
373
  - spec/support/matchers/validate_non_nilness_of.rb
368
- - spec/support/shared/contexts/mdm/workspace.rb
369
374
  - spec/support/shared/contexts/metasploit/credential/exporter/export_objects.rb
370
375
  - spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
371
376
  - spec/support/shared/contexts/metasploit/credential/search/operation/type.rb
@@ -406,6 +411,9 @@ test_files:
406
411
  - spec/dummy/app/controllers/application_controller.rb
407
412
  - spec/dummy/app/helpers/application_helper.rb
408
413
  - spec/dummy/app/views/layouts/application.html.erb
414
+ - spec/dummy/bin/bundle
415
+ - spec/dummy/bin/rails
416
+ - spec/dummy/bin/rake
409
417
  - spec/dummy/config.ru
410
418
  - spec/dummy/config/application.rb
411
419
  - spec/dummy/config/boot.rb
@@ -416,7 +424,10 @@ test_files:
416
424
  - spec/dummy/config/environments/development.rb
417
425
  - spec/dummy/config/environments/production.rb
418
426
  - spec/dummy/config/environments/test.rb
427
+ - spec/dummy/config/initializers/assets.rb
419
428
  - spec/dummy/config/initializers/backtrace_silencers.rb
429
+ - spec/dummy/config/initializers/cookies_serializer.rb
430
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
420
431
  - spec/dummy/config/initializers/inflections.rb
421
432
  - spec/dummy/config/initializers/mime_types.rb
422
433
  - spec/dummy/config/initializers/secret_token.rb
@@ -488,7 +499,6 @@ test_files:
488
499
  - spec/models/metasploit_data_models/search/visitor/relation_spec.rb
489
500
  - spec/spec_helper.rb
490
501
  - spec/support/matchers/validate_non_nilness_of.rb
491
- - spec/support/shared/contexts/mdm/workspace.rb
492
502
  - spec/support/shared/contexts/metasploit/credential/exporter/export_objects.rb
493
503
  - spec/support/shared/contexts/metasploit/credential/importer/zip/file.rb
494
504
  - spec/support/shared/contexts/metasploit/credential/search/operation/type.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,6 +0,0 @@
1
- RSpec.shared_context 'Mdm::Workspace' do
2
- before(:example) do
3
- # TODO remove Rex usage from Mdm as it is not a declared dependency
4
- allow_any_instance_of(Mdm::Workspace).to receive(:valid_ip_or_range?).and_return(true)
5
- end
6
- end