Method: PacketFu::ICMPPacket.can_parse?
- Defined in:
- lib/packetfu/protos/icmp.rb
.can_parse?(str) ⇒ Boolean
45 46 47 48 49 50 51 |
# File 'lib/packetfu/protos/icmp.rb', line 45 def self.can_parse?(str) return false unless str.size >= 38 return false unless EthPacket.can_parse? str return false unless IPPacket.can_parse? str return false unless str[23,1] == "\x01" return true end |