Cleaned up msfvenom a bit

This commit is contained in:
g0tmi1k 2013-06-26 16:22:47 +01:00
parent c65fcfc09d
commit 2b2ded3d83
1 changed files with 7 additions and 7 deletions

View File

@ -48,7 +48,7 @@ def parse_args
opts[:nopsled] = n.to_i opts[:nopsled] = n.to_i
end end
opt.on('-f', '--format [format]', String, "Output format (use --help-formats for a list)") do |f| opt.on('-f', '--format [format]', String, 'Output format (use --help-formats for a list)') do |f|
opts[:format] = f opts[:format] = f
end end
@ -69,19 +69,19 @@ def parse_args
opts[:space] = s opts[:space] = s
end end
opt.on('-b', '--bad-chars [list] ', String, 'The list of characters to avoid example: \'\x00\xff\'') do |b| opt.on('-b', '--bad-chars [list]', String, 'The list of characters to avoid example: \'\x00\xff\'') do |b|
opts[:badchars] = b opts[:badchars] = b
end end
opt.on('-i', '--iterations [count] ', Integer, 'The number of times to encode the payload') do |i| opt.on('-i', '--iterations [count]', Integer, 'The number of times to encode the payload') do |i|
opts[:iterations] = i opts[:iterations] = i
end end
opt.on('-c', '--add-code [path] ', String, 'Specify an additional win32 shellcode file to include') do |x| opt.on('-c', '--add-code [path]', String, 'Specify an additional win32 shellcode file to include') do |x|
opts[:addshellcode] = x opts[:addshellcode] = x
end end
opt.on('-x', '--template [path] ', String, 'Specify a custom executable file to use as a template') do |x| opt.on('-x', '--template [path]', String, 'Specify a custom executable file to use as a template') do |x|
opts[:template] = x opts[:template] = x
unless File.exist?(x) unless File.exist?(x)
$stderr.puts "Template file (#{x}) does not exist" $stderr.puts "Template file (#{x}) does not exist"
@ -93,7 +93,7 @@ def parse_args
opts[:inject] = true opts[:inject] = true
end end
opt.on('-o', '--options', "List the payload's standard options") do opt.on('-o', '--options', 'List the payload\'s standard options') do
opts[:list_options] = true opts[:list_options] = true
end end
@ -102,7 +102,7 @@ def parse_args
exit(1) exit(1)
end end
opt.on_tail('--help-formats', String, "List available formats") do opt.on_tail('--help-formats', String, 'List available formats') do
require 'rex' require 'rex'
require 'msf/ui' require 'msf/ui'
require 'msf/base' require 'msf/base'