Add a find_layers method
git-svn-id: file:///home/svn/framework3/trunk@5456 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
36376e10be
commit
03276c9cc0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue