Added Argument Error Handling

bug/bundler_fix
x90" * 365 2016-01-06 22:34:58 -05:00
parent 7e70cb6fe8
commit e7dc3aa99c
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
#
# $Id$
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
@ -41,6 +41,8 @@ module PatternCreate
if options.empty?
raise OptionParser::MissingArgument, 'No options set, try -h for usage'
elsif options[:length].blank? && options[:sets]
raise OptionParser::MissingArgument, '-l <length> is required'
end
options[:sets] = nil unless options[:sets]
@ -63,7 +65,6 @@ class Driver
pattern = Rex::Text.pattern_create(@opts[:length], @opts[:sets])
puts pattern
end
end
end
@ -77,4 +78,3 @@ if __FILE__ == $PROGRAM_NAME
$stderr.puts "[*] If necessary, please refer to framework.log for more details."
end
end