Class: PacketFu::Packet

Inherits:
Object
  • Object
show all
Defined in:
lib/bettercap/monkey/packetfu/utils.rb

Direct Known Subclasses

BetterCap::Spoofers::ICMPRedirectPacket

Instance Method Summary collapse

Instance Method Details

#eth2s(which = :src) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/bettercap/monkey/packetfu/utils.rb', line 21

def eth2s(which = :src)
  case which
  when :src
    self.eth_src.bytes.map(&(Proc.new {|x| sprintf('%02X',x) })).join(':')
  when :dst
    self.eth_dst.bytes.map(&(Proc.new {|x| sprintf('%02X',x) })).join(':')
  end
end