When unable to determine destination MAC, vprint and return false

Fixes #6006.

~20 related modules are affected by this defect and by this "fix"
bug/bundler_fix
Jon Hart 2015-09-26 15:13:26 -07:00
parent c85913fd12
commit b508625957
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 2 additions and 1 deletions

View File

@ -242,7 +242,8 @@ module Msf
dev ||= datastore['INTERFACE']
dst_mac, src_mac = lookup_eth(dhost, dev)
if dst_mac == nil and not bcast
raise RuntimeError, 'Unable to determine the destination MAC and bcast is false'
vprint_error("Unable to determine the destination MAC for #{dhost} on #{dev} and bcast is false")
return false
end
inject_eth(:payload => payload, :eth_daddr => dst_mac, :eth_saddr => src_mac)
end