Class: Ownlan::Manual::Broadcast
- Inherits:
-
Object
- Object
- Ownlan::Manual::Broadcast
- Defined in:
- lib/ownlan/manual/broadcast.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#crafted_packet ⇒ Object
readonly
Returns the value of attribute crafted_packet.
Instance Method Summary collapse
- #generate_packet ⇒ Object
-
#initialize(config) ⇒ Broadcast
constructor
A new instance of Broadcast.
- #process ⇒ Object
Constructor Details
#initialize(config) ⇒ Broadcast
Returns a new instance of Broadcast.
7 8 9 |
# File 'lib/ownlan/manual/broadcast.rb', line 7 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/ownlan/manual/broadcast.rb', line 5 def config @config end |
#crafted_packet ⇒ Object (readonly)
Returns the value of attribute crafted_packet.
5 6 7 |
# File 'lib/ownlan/manual/broadcast.rb', line 5 def crafted_packet @crafted_packet end |
Instance Method Details
#generate_packet ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/ownlan/manual/broadcast.rb', line 17 def generate_packet saddr = config.source_mac daddr = config.victim_mac saddr_ip = config.source_ip daddr_ip = config.victim_ip @crafted_packet = packet_craft(saddr, daddr, saddr_ip, daddr_ip).call end |
#process ⇒ Object
11 12 13 14 15 |
# File 'lib/ownlan/manual/broadcast.rb', line 11 def process generate_packet send_packet end |