Add msfvenom -l arches like -l platforms
parent
8213c21dc9
commit
98aba35b29
28
msfvenom
28
msfvenom
|
@ -69,7 +69,7 @@ def parse_args(args)
|
|||
opt.separator('')
|
||||
opt.separator('Options:')
|
||||
|
||||
opt.on('-l', '--list <type>', Array, 'List all modules for [type]. Types are: payloads, encoders, nops, platforms, encrypt, formats, all') do |l|
|
||||
opt.on('-l', '--list <type>', Array, 'List all modules for [type]. Types are: payloads, encoders, nops, platforms, arches, encrypt, formats, all') do |l|
|
||||
if l.to_s.empty?
|
||||
l = ["all"]
|
||||
end
|
||||
|
@ -113,7 +113,7 @@ def parse_args(args)
|
|||
opts[:encryption_iv] = e
|
||||
end
|
||||
|
||||
opt.on('-a', '--arch <arch>', String, 'The architecture to use for --payload and --encoders') do |a|
|
||||
opt.on('-a', '--arch <arch>', String, 'The architecture to use for --payload and --encoders (use --list arches to list)') do |a|
|
||||
opts[:arch] = a
|
||||
end
|
||||
|
||||
|
@ -245,6 +245,25 @@ def dump_platforms
|
|||
"\n" + tbl.to_s + "\n"
|
||||
end
|
||||
|
||||
def dump_arches
|
||||
init_framework(:module_types => [])
|
||||
supported_arches = ARCH_ALL.dup
|
||||
|
||||
tbl = Rex::Text::Table.new(
|
||||
'Indent' => 4,
|
||||
'Header' => "Framework Architectures [--arch <value>]",
|
||||
'Columns' =>
|
||||
[
|
||||
"Name",
|
||||
])
|
||||
|
||||
supported_arches.sort.each do |name|
|
||||
tbl << [name]
|
||||
end
|
||||
|
||||
"\n" + tbl.to_s + "\n"
|
||||
end
|
||||
|
||||
def dump_encrypt
|
||||
init_framework(:module_types => [])
|
||||
tbl = Rex::Text::Table.new(
|
||||
|
@ -371,6 +390,8 @@ if generator_opts[:list]
|
|||
$stdout.puts dump_nops
|
||||
when "platforms", "dump_platform"
|
||||
$stdout.puts dump_platforms
|
||||
when "arches", "dump_arch"
|
||||
$stdout.puts dump_arches
|
||||
when "encrypts", "encrypt", "encryption"
|
||||
$stdout.puts dump_encrypt
|
||||
when "formats", "format", "f"
|
||||
|
@ -383,10 +404,11 @@ if generator_opts[:list]
|
|||
$stdout.puts dump_encoders
|
||||
$stdout.puts dump_nops
|
||||
$stdout.puts dump_platforms
|
||||
$stdout.puts dump_arches
|
||||
$stdout.puts dump_encrypt
|
||||
$stdout.puts dump_formats
|
||||
else
|
||||
$stderr.puts "Invalid type (#{mod}). These are valid: payloads, encoders, nops, platforms, encrypt, formats, all"
|
||||
$stderr.puts "Invalid type (#{mod}). These are valid: payloads, encoders, nops, platforms, arches, encrypt, formats, all"
|
||||
end
|
||||
end
|
||||
exit(0)
|
||||
|
|
Loading…
Reference in New Issue