Class: Ownlan::Attack::Client

Inherits:
Base
  • Object
show all
Defined in:
lib/ownlan/attack/client.rb

Instance Attribute Summary

Attributes inherited from Base

#config, #crafted_packet

Instance Method Summary collapse

Methods inherited from Base

#initialize, #ip_to_mac

Constructor Details

This class inherits a constructor from Ownlan::Attack::Base

Instance Method Details

#generate_packet(target_ip = nil) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ownlan/attack/client.rb', line 11

def generate_packet(target_ip = nil)
  gw_ip    = ServiceObjects::NetworkInformation.gateway_ip

  saddr    = config.source_mac
  daddr    = config.victim_mac || victim_mac
  saddr_ip = gw_ip
  daddr_ip = victim_ip


  @crafted_packet = packet_craft(saddr, daddr, saddr_ip, daddr_ip).call
end

#processObject



5
6
7
8
9
# File 'lib/ownlan/attack/client.rb', line 5

def process
  generate_packet

  send_packet
end