-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rake task to generate manifest #675
Conversation
17a33e9
to
3e3a6dd
Compare
gem/Rakefile
Outdated
task :win_prep => [:create_dir, :win_compile, :win_copy] do | ||
task :create_manifest do | ||
all_meterpreter_data = ::Dir.glob(dest + '/**/*').select { |f| ::File.file?(f) }.sort | ||
manifest = all_meterpreter_data.map { |f| "#{f}:#{hash_type}:#{::OpenSSL::Digest.new(hash_type, ::File.read(f))}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
manifest = all_meterpreter_data.map { |f| "#{f}:#{hash_type}:#{::OpenSSL::Digest.new(hash_type, ::File.read(f))}" } | |
manifest = all_meterpreter_data.map { |f| [f, hash_type, ::OpenSSL::Digest.new(hash_type, ::File.binread(f))].join(':') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want the hashes to be different on windows/linux - so prefer binread
and binwrite
3e3a6dd
to
3244765
Compare
3244765
to
670d71e
Compare
Looks good to me; We'll need to wire this up as part of the release process |
@sjanusz-r7 I don't think this is working on CI just yet, the manifest file didn't seem to generate when downloading the created gem I think this needs to be updated: metasploit-payloads/gem/metasploit-payloads.gemspec Lines 18 to 19 in c22a31f
|
This PR is a pre-requisite for #673
This PR adds a Rake task to generate a manifest allowing us to keep track of all the necessary Meterpreter files in this gem.
Example:
manifest
manifest.uuid
Testing
bundle install
bundle exec 'rake create_manifest'
manifest
file is created and contains a list of all Meterpreter filesmanifest.uuid
file contains the SHA3-256 hash for themanifest
file