Changeset 5456

Show
Ignore:
Timestamp:
03/22/08 14:55:23 (2 months ago)
Author:
hdm
Message:

Add a find_layers method

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/trunk/lib/msf/core/exploit/capture.rb

    r5446 r5456  
    143143        end 
    144144 
     145        def find_layers(pkt, cls) 
     146                res = [] 
     147                pkt.layers_list.each do |layer| 
     148                        if layer.class == cls 
     149                                res << layer 
     150                        end 
     151                end 
     152                res 
     153        end 
     154 
     155 
    145156        attr_accessor :capture 
    146157