Add a find_layers method

git-svn-id: file:///home/svn/framework3/trunk@5456 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-03-22 19:55:23 +00:00
parent 36376e10be
commit 03276c9cc0
1 changed files with 11 additions and 0 deletions

View File

@ -142,6 +142,17 @@ module Exploit::Capture
end
end
def find_layers(pkt, cls)
res = []
pkt.layers_list.each do |layer|
if layer.class == cls
res << layer
end
end
res
end
attr_accessor :capture
end