Skip to content

Commit 41eba74

Browse files
committed
prefer Addrinfo over ipaddress gem
1 parent 17aef43 commit 41eba74

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

Gemfile.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ PATH
1111
bit-struct
1212
dnsruby
1313
filesize
14-
ipaddress
1514
jsobfu
1615
json
1716
metasm
@@ -129,7 +128,6 @@ GEM
129128
fivemat (1.3.5)
130129
hashery (2.1.2)
131130
i18n (0.8.6)
132-
ipaddress (0.8.3)
133131
jsobfu (0.4.2)
134132
rkelly-remix
135133
json (2.1.0)

lib/msf/core/auxiliary/udp_scanner.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# -*- coding: binary -*-
22

3-
require 'ipaddress'
4-
53
module Msf
64

75
###
@@ -129,7 +127,8 @@ def scanner_send(data, ip, port)
129127
resend_count = 0
130128

131129
begin
132-
unless IPAddress(ip).multicast?
130+
addrinfo = Addrinfo.ip(ip)
131+
unless addrinfo.ipv4_multicast? || addrinfo.ipv6_multicast?
133132
sock = udp_socket(ip, port, bind_peer: true)
134133
sock.send(data, 0)
135134
else

metasploit-framework.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ Gem::Specification.new do |spec|
5454
spec.add_runtime_dependency 'backports'
5555
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
5656
spec.add_runtime_dependency 'bcrypt'
57-
# Address manipulation (TODO: evaluate to replace rex-socket address handling)
58-
spec.add_runtime_dependency 'ipaddress'
5957
# Needed for Javascript obfuscation
6058
spec.add_runtime_dependency 'jsobfu'
6159
# Needed for some admin modules (scrutinizer_add_user.rb)

0 commit comments

Comments
 (0)