allow downcased arch names
git-svn-id: file:///home/svn/framework3/trunk@12254 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
3c7bf5bf45
commit
b10963bd69
|
@ -35,13 +35,20 @@ $args = Rex::Parser::Arguments.new(
|
||||||
|
|
||||||
$args.parse(ARGV) { |opt, idx, val|
|
$args.parse(ARGV) { |opt, idx, val|
|
||||||
case opt
|
case opt
|
||||||
when "-a"
|
when "-a"
|
||||||
usage unless @Arch.include?(val)
|
found = nil
|
||||||
String.class_eval("@@cpu = Metasm::#{val}.new")
|
@Arch.each { |a|
|
||||||
when "-h"
|
if val.downcase == a.downcase
|
||||||
usage
|
String.class_eval("@@cpu = Metasm::#{a}.new")
|
||||||
else
|
found = true
|
||||||
usage
|
end
|
||||||
|
}
|
||||||
|
usage if not found
|
||||||
|
|
||||||
|
when "-h"
|
||||||
|
usage
|
||||||
|
else
|
||||||
|
usage
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue