Skip to content

Commit

Permalink
Add agent option ndp
Browse files Browse the repository at this point in the history
  • Loading branch information
dimriou committed Feb 1, 2017
1 parent 56a9d7f commit 7e4430f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/bettercap/network/network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ def ip2name( address )
# complete their job.
# If +address+ is not nil only that ip will be probed.
def start_agents( ctx, address = nil )
[ 'Icmp', 'Udp', 'Arp' ].each do |name|
BetterCap::Loader.load("BetterCap::Discovery::Agents::#{name}").new(ctx, address)
if ctx.options.core.use_ipv6
BetterCap::Loader.load("BetterCap::Discovery::Agents::Ndp").new(ctx, address)
else
[ 'Icmp', 'Udp', 'Arp' ].each do |name|
BetterCap::Loader.load("BetterCap::Discovery::Agents::#{name}").new(ctx, address)
end
end
ctx.packets.wait_empty( ctx.timeout )
end
Expand Down

0 comments on commit 7e4430f

Please sign in to comment.