metasploit_payloads-mettle 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/build/aarch64-linux-musl/bin/mettle +0 -0
  5. data/build/aarch64-linux-musl/bin/mettle.bin +0 -0
  6. data/build/armv5b-linux-musleabi/bin/mettle +0 -0
  7. data/build/armv5b-linux-musleabi/bin/mettle.bin +0 -0
  8. data/build/armv5l-linux-musleabi/bin/mettle +0 -0
  9. data/build/armv5l-linux-musleabi/bin/mettle.bin +0 -0
  10. data/build/darwin.x86_64/bin/mettle +0 -0
  11. data/build/i486-linux-musl/bin/mettle +0 -0
  12. data/build/i486-linux-musl/bin/mettle.bin +0 -0
  13. data/build/mips-linux-muslsf/bin/mettle +0 -0
  14. data/build/mips-linux-muslsf/bin/mettle.bin +0 -0
  15. data/build/mips64-linux-muslsf/bin/mettle +0 -0
  16. data/build/mips64-linux-muslsf/bin/mettle.bin +0 -0
  17. data/build/mipsel-linux-muslsf/bin/mettle +0 -0
  18. data/build/mipsel-linux-muslsf/bin/mettle.bin +0 -0
  19. data/build/powerpc-e500v2-linux-musl/bin/mettle +0 -0
  20. data/build/powerpc-e500v2-linux-musl/bin/mettle.bin +0 -0
  21. data/build/powerpc-linux-muslsf/bin/mettle +0 -0
  22. data/build/powerpc-linux-muslsf/bin/mettle.bin +0 -0
  23. data/build/powerpc64le-linux-musl/bin/mettle +0 -0
  24. data/build/powerpc64le-linux-musl/bin/mettle.bin +0 -0
  25. data/build/s390x-linux-musl/bin/mettle +0 -0
  26. data/build/s390x-linux-musl/bin/mettle.bin +0 -0
  27. data/build/x86_64-apple-darwin/bin/mettle +0 -0
  28. data/build/x86_64-linux-musl/bin/mettle +0 -0
  29. data/build/x86_64-linux-musl/bin/mettle.bin +0 -0
  30. data/lib/metasploit_payloads/mettle.rb +33 -4
  31. data/lib/metasploit_payloads/mettle/version.rb +1 -1
  32. metadata +2 -2
  33. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76ee97c5302c17e0638827ad3010dad982989f5f
4
- data.tar.gz: 0e67cb6355a74f4ccebe0f3544044a106e99fa43
3
+ metadata.gz: 94ef564940be6bb429936d43552456f2a83be1d2
4
+ data.tar.gz: d2df45210763789568e3081057d6b543c0b7402b
5
5
  SHA512:
6
- metadata.gz: 17634a596b4a01f743123790b0533f16993c8a3567061a888a0cbb67aec2f0bdb19c6fc950da5ff0af33f06f46e9d88c32bc7f9337de2174b94d65912468831c
7
- data.tar.gz: c8575bbf576ebe2bfbc28208368e3004f98f2ae6bb7fbc9bbaf58ec5928978965b001ba1e49917ecd42a8c1e83f463af27cba09f498a82e444ad3968bbbe207f
6
+ metadata.gz: 352bafd89808a2133cd3710abc67bc4f615a48bf22f3514e8a946522dad4c75ad12b23af15505cc2849a5502abd46162efb4d5ddc0012b19d070051a4ab8096a
7
+ data.tar.gz: 1a49878a24d6611599164dee0198296e19c0cdaf08a747302f392504d16390f9aed267956d5625ccf4edf556ae7cd8ded278ad2d7d2ee0fd0f0dcdb51d909408
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -92,15 +92,15 @@ module MetasploitPayloads
92
92
  #
93
93
  # Get the contents of any file packaged in this gem by local path and name.
94
94
  #
95
- def self.read(triple, format)
95
+ def self.read(triple, format, filename = "mettle")
96
96
  file =
97
97
  case format
98
98
  when :process_image
99
- 'mettle.bin'
99
+ "#{filename}.bin"
100
100
  when :exec
101
- 'mettle'
101
+ "#{filename}"
102
102
  else
103
- fail RuntimeError, "unknown mettle format #{format}", caller
103
+ fail RuntimeError, "unknown format #{format} for #{filename}", caller
104
104
  end
105
105
  file_path = path("#{triple}", 'bin', file)
106
106
  if file_path.nil?
@@ -155,5 +155,34 @@ module MetasploitPayloads
155
155
  @local_paths << path
156
156
  end
157
157
  end
158
+
159
+ #
160
+ # List extensions which are available for loading
161
+ #
162
+ def self.available_extensions(platform)
163
+ dir_path = path("#{platform}", 'bin')
164
+ if dir_path.nil?
165
+ full_path = ::File.join([platform, 'bin'])
166
+ fail RuntimeError, "#{full_path} not found", caller
167
+ end
168
+
169
+ extensions = ::Dir.entries(dir_path)
170
+ # Only return extensions!
171
+ extensions - [ '.', '..', 'mettle', 'mettle.bin' ]
172
+ end
173
+
174
+ #
175
+ # Load and return the contents of an extension as an object
176
+ #
177
+ def self.load_extension(platform, name, suffix = '')
178
+ if suffix == 'bin'
179
+ format = :process_image
180
+ else
181
+ format = :exec
182
+ name = [name,suffix].join('.') unless suffix.blank?
183
+ end
184
+ self.read(platform, format, name)
185
+ end
186
+
158
187
  end
159
188
  end
@@ -1,7 +1,7 @@
1
1
  # -*- coding:binary -*-
2
2
  module MetasploitPayloads
3
3
  class Mettle
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit_payloads-mettle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cammack
@@ -89,7 +89,7 @@ cert_chain:
89
89
  G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
90
90
  8mVuTXnyJOKRJA==
91
91
  -----END CERTIFICATE-----
92
- date: 2017-11-27 00:00:00.000000000 Z
92
+ date: 2017-12-08 00:00:00.000000000 Z
93
93
  dependencies:
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: bundler
metadata.gz.sig CHANGED
Binary file