Permalink
Browse files

moved the default option setting and fixed option checks to display help

git-svn-id: file:///home/svn/framework3/trunk@12905 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information...
1 parent a0c2321 commit b6b8aa0f575f0cb0905179a81f7599e515c51e21 @bannedit bannedit committed Jun 10, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 msfrop
View
@@ -27,9 +27,6 @@ end
opts = {}
-# set defaults
-opts[:depth] = 3
-
opt = OptionParser.new
opt.banner = "Usage #{$PROGRAM_NAME} <option> [targets]"
opt.separator('')
@@ -67,6 +64,15 @@ rescue OptionParser::InvalidOption
exit(1)
end
+if opts.empty?
+ puts "no options"
+ puts opt
+ exit(1)
+end
+
+# set defaults
+opts[:depth] ||= 3
+
gadgets = []
if opts[:import].nil?

0 comments on commit b6b8aa0

Please sign in to comment.