Skip to content

Commit e9d8575

Browse files
author
朱雄宇
authored
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.
1 parent 265567f commit e9d8575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/auxiliary/spoof/arp/arp_poisoning.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def run
7979
raise RuntimeError ,'Source MAC is not in correct format' unless is_mac?(@smac)
8080

8181
@sip = datastore['LOCALSIP']
82-
@sip ||= get_ipv4_addr(@interface)[0] if @netifaces
82+
@sip ||= get_ipv4_addr(@interface) if @netifaces
8383
raise "LOCALSIP is not defined and can not be guessed" unless @sip
8484
raise "LOCALSIP is not an ipv4 address" unless Rex::Socket.is_ipv4?(@sip)
8585

0 commit comments

Comments
 (0)