metasploit-credential 6.0.24 → 6.0.25
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
- data/lib/metasploit/credential/exporter/core.rb +1 -1
- data/lib/metasploit/credential/importer/zip.rb +2 -2
- data/lib/metasploit/credential/version.rb +1 -1
- data/spec/dummy/tmp/local_secret.txt +1 -1
- data/spec/factories/metasploit/credential/importer/zips.rb +3 -3
- data/spec/lib/metasploit/credential/migrator_spec.rb +8 -2
- metadata +10 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b79b3241ac24ff895337145ad3b35a0f2c46ae71007bbba47be325e18529e98
|
|
4
|
+
data.tar.gz: 53dd208977fa318604ac5daede336b55e9472780fb8f748321b6abfa4f1e2b86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8155a582f071242f7c33169c4eef45af5233c70cb6d01213d628fcbe765b026b42f136c663c307047ad5a1d566b0ffa2fd24a5d0b984cfa29f55f55caaef5fe6
|
|
7
|
+
data.tar.gz: 526d5baf8695f8d4e801397b790582d369827a354b2ff71e5cc38ea559b00daf48c7f9a695f176dc4707bf9f5c1465936067b2655622e6b780fe86bbeba5836c
|
|
@@ -211,7 +211,7 @@ class Metasploit::Credential::Exporter::Core
|
|
|
211
211
|
def render_zip
|
|
212
212
|
zip_dir_path = Pathname.new(output_final_directory_path)
|
|
213
213
|
|
|
214
|
-
Zip::File.open(output_zipfile_path,
|
|
214
|
+
Zip::File.open(output_zipfile_path, create: true) do |zipfile|
|
|
215
215
|
Dir[File.join(output_final_directory_path, '**', '**')].each do |file|
|
|
216
216
|
file_path = Pathname.new(file)
|
|
217
217
|
path_in_zip = file_path.relative_path_from(zip_dir_path)
|
|
@@ -57,7 +57,7 @@ class Metasploit::Credential::Importer::Zip
|
|
|
57
57
|
def import!
|
|
58
58
|
::Zip::File.open(input.path) do |zip_file|
|
|
59
59
|
zip_file.each do |entry|
|
|
60
|
-
entry.extract(File.join(extracted_zip_directory
|
|
60
|
+
entry.extract(destination_directory: File.join(extracted_zip_directory))
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -80,7 +80,7 @@ class Metasploit::Credential::Importer::Zip
|
|
|
80
80
|
# @return [void]
|
|
81
81
|
def input_is_well_formed
|
|
82
82
|
begin
|
|
83
|
-
Zip::File.open
|
|
83
|
+
::Zip::File.open(input.path) do |archive|
|
|
84
84
|
glob_check = archive.glob("**#{File::SEPARATOR}#{MANIFEST_FILE_NAME}")
|
|
85
85
|
if glob_check.present?
|
|
86
86
|
true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b920c4bc020b25ab6c0840bf87217b4f4f56f260770237ead0da8fb6fbad1c3cf24d82231c9b683cfbeb71ba9e54cd576b7ea6e62788641f9f38c97107eb232b
|
|
@@ -57,7 +57,7 @@ FactoryBot.define do
|
|
|
57
57
|
|
|
58
58
|
# Write out zip file
|
|
59
59
|
zip_location = "#{path}.zip"
|
|
60
|
-
::Zip::File.open(zip_location,
|
|
60
|
+
::Zip::File.open(zip_location, create: true) do |zipfile|
|
|
61
61
|
Dir[File.join(path, '**', '**')].each do |file|
|
|
62
62
|
zipfile.add(file.sub(path + '/', ''), file)
|
|
63
63
|
end
|
|
@@ -98,7 +98,7 @@ FactoryBot.define do
|
|
|
98
98
|
|
|
99
99
|
# Write out zip file
|
|
100
100
|
zip_location = "#{path}.zip"
|
|
101
|
-
::Zip::File.open(zip_location,
|
|
101
|
+
::Zip::File.open(zip_location, create: true) do |zipfile|
|
|
102
102
|
Dir[File.join(path, '**', '**')].each do |file|
|
|
103
103
|
zipfile.add(file.sub(path + '/', ''), file)
|
|
104
104
|
end
|
|
@@ -140,7 +140,7 @@ FactoryBot.define do
|
|
|
140
140
|
|
|
141
141
|
# Write out zip file
|
|
142
142
|
zip_location = "#{path}.zip"
|
|
143
|
-
::Zip::File.open(zip_location,
|
|
143
|
+
::Zip::File.open(zip_location, create: true) do |zipfile|
|
|
144
144
|
Dir[File.join(path, '**', '**')].each do |file|
|
|
145
145
|
zipfile.add(file.sub(path + '/', ''), file)
|
|
146
146
|
end
|
|
@@ -99,13 +99,15 @@ RSpec.describe Metasploit::Credential::Migrator do
|
|
|
99
99
|
|
|
100
100
|
context "when Cred#pass points to a file system path" do
|
|
101
101
|
|
|
102
|
-
let(:
|
|
102
|
+
let(:ssh_key_tempfile) do
|
|
103
103
|
t = Tempfile.new('ssh')
|
|
104
104
|
t.write(ssh_key_content)
|
|
105
105
|
t.close
|
|
106
|
-
t
|
|
106
|
+
t
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
+
let(:path_to_ssh_key) { ssh_key_tempfile.path }
|
|
110
|
+
|
|
109
111
|
let(:cred) do
|
|
110
112
|
FactoryBot.create(:mdm_cred,
|
|
111
113
|
service: service,
|
|
@@ -114,6 +116,10 @@ RSpec.describe Metasploit::Credential::Migrator do
|
|
|
114
116
|
)
|
|
115
117
|
end
|
|
116
118
|
|
|
119
|
+
after(:example) do
|
|
120
|
+
ssh_key_tempfile.unlink
|
|
121
|
+
end
|
|
122
|
+
|
|
117
123
|
before(:example) do
|
|
118
124
|
migrator.convert_creds_in_workspace(cred.service.host.workspace)
|
|
119
125
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metasploit-credential
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.25
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Metasploit Hackers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metasploit-concern
|
|
@@ -84,16 +84,22 @@ dependencies:
|
|
|
84
84
|
name: rubyzip
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: 3.1.1
|
|
87
90
|
- - "<"
|
|
88
91
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
92
|
+
version: '4.0'
|
|
90
93
|
type: :runtime
|
|
91
94
|
prerelease: false
|
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
96
|
requirements:
|
|
97
|
+
- - ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: 3.1.1
|
|
94
100
|
- - "<"
|
|
95
101
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
102
|
+
version: '4.0'
|
|
97
103
|
- !ruby/object:Gem::Dependency
|
|
98
104
|
name: rex-socket
|
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|