Class: Ownlan::Protect::Resynchronize
- Inherits:
-
Base
- Object
- Base
- Ownlan::Protect::Resynchronize
show all
- Defined in:
- lib/ownlan/protect/resynchronize.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#config
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Attribute Details
#client_packet ⇒ Object
Returns the value of attribute client_packet.
5
6
7
|
# File 'lib/ownlan/protect/resynchronize.rb', line 5
def client_packet
@client_packet
end
|
#gateway_packet ⇒ Object
Returns the value of attribute gateway_packet.
5
6
7
|
# File 'lib/ownlan/protect/resynchronize.rb', line 5
def gateway_packet
@gateway_packet
end
|
Instance Method Details
#client_mac ⇒ Object
27
28
29
|
# File 'lib/ownlan/protect/resynchronize.rb', line 27
def client_mac
::Ownlan::Attack::Base.new(config).ip_to_mac(config.target_ip)
end
|
#process ⇒ Object
7
8
9
10
11
12
13
14
15
|
# File 'lib/ownlan/protect/resynchronize.rb', line 7
def process
config.source_mac = gateway_mac
@gateway_packet = Ownlan::Attack::Client.new(config).generate_packet
config.source_mac = client_mac
@client_packet = Ownlan::Attack::Gateway.new(config).generate_packet
send
end
|