print message when skipping because of bad magic number
git-svn-id: file:///home/svn/framework3/trunk@6154 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
d53ac9648c
commit
4927e7121b
|
@ -86,7 +86,10 @@ ARGV.each do |file|
|
||||||
begin
|
begin
|
||||||
elf = Rex::ElfParsey::Elf.new_from_file(file, true)
|
elf = Rex::ElfParsey::Elf.new_from_file(file, true)
|
||||||
rescue Rex::ElfParsey::ElfHeaderError
|
rescue Rex::ElfParsey::ElfHeaderError
|
||||||
next if $!.message == 'Invalid magic number'
|
if $!.message == 'Invalid magic number'
|
||||||
|
$stderr.puts("Skipping #{file}: #{$!}")
|
||||||
|
next
|
||||||
|
end
|
||||||
raise $!
|
raise $!
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
$stderr.puts("File does not exist: #{file}")
|
$stderr.puts("File does not exist: #{file}")
|
||||||
|
|
Loading…
Reference in New Issue