From e9d85750c232f1940ef8b934122bd88578981494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E9=9B=84=E5=AE=87?= Date: Sun, 6 Nov 2016 19:04:57 +0800 Subject: [PATCH] fix get_ipv4_addr(@interface) usage get_ipv4_addr(@interface) returns a string not list, so get_ipv4_addr(@interface)[0] only got the first character of IP, which raises an error. --- modules/auxiliary/spoof/arp/arp_poisoning.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/auxiliary/spoof/arp/arp_poisoning.rb b/modules/auxiliary/spoof/arp/arp_poisoning.rb index aacfb39fd4..388d2101a3 100644 --- a/modules/auxiliary/spoof/arp/arp_poisoning.rb +++ b/modules/auxiliary/spoof/arp/arp_poisoning.rb @@ -79,7 +79,7 @@ class MetasploitModule < Msf::Auxiliary raise RuntimeError ,'Source MAC is not in correct format' unless is_mac?(@smac) @sip = datastore['LOCALSIP'] - @sip ||= get_ipv4_addr(@interface)[0] if @netifaces + @sip ||= get_ipv4_addr(@interface) if @netifaces raise "LOCALSIP is not defined and can not be guessed" unless @sip raise "LOCALSIP is not an ipv4 address" unless Rex::Socket.is_ipv4?(@sip)