Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit b6b8aa0f575f0cb0905179a81f7599e515c51e21 1 parent a0c2321
@bannedit bannedit authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 msfrop
View
12 msfrop
@@ -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?
Please sign in to comment.
Something went wrong with that request. Please try again.