class PacketGen::Packet
Public Instance Methods
arp?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 40 def arp? return true if self.is? 'ARP' end
dns?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 32 def dns? return true if self.is? 'DNS' end
ftp?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 3 def ftp? return false unless self.is? 'TCP' self.tcp.dport == 21 || self.tcp.sport == 21 end
http?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 17 def http? return false unless self.is? 'TCP' self.is? 'HTTP::Request' or self.is? 'HTTP::Response' end
https?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 22 def https? return false unless self.is? 'TCP' self.tcp.dport == 443 || self.tcp.sport == 443 end
icmp?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 13 def icmp? self.is? 'ICMP' end
ip?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 36 def ip? return true if self.is? 'IP' end
ssh?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 8 def ssh? return false unless self.is? 'TCP' self.tcp.dport == 22 || self.tcp.sport == 22 end
telnet?()
click to toggle source
# File lib/capra/packetgen_extensions.rb, line 27 def telnet? return false unless self.is? 'TCP' self.tcp.dport == 23 || self.tcp.sport == 23 end