added checks to ensure a mode it properly set and supported by the format
git-svn-id: file:///home/svn/framework3/trunk@12860 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
fd04578a90
commit
de6fca43d7
|
@ -126,7 +126,7 @@ rescue OptionParser::InvalidOption
|
|||
exit(1)
|
||||
end
|
||||
|
||||
if not mode
|
||||
if not mode or mode.nil?
|
||||
puts "A mode must be selected"
|
||||
exit(1)
|
||||
end
|
||||
|
@ -198,6 +198,11 @@ files.each do |file|
|
|||
pe.image_base = param['imagebase'];
|
||||
end
|
||||
|
||||
if not worker
|
||||
$stderr.puts("A mode could not be set for this file.")
|
||||
next
|
||||
end
|
||||
|
||||
o = worker.new(pe)
|
||||
o.scan(param)
|
||||
|
||||
|
|
Loading…
Reference in New Issue