Use Rex to check IPv4 instead of using resolv
parent
b5e556519b
commit
3b6947c1d7
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
require 'msf/core'
|
require 'msf/core'
|
||||||
require 'msf/core/auxiliary/report'
|
require 'msf/core/auxiliary/report'
|
||||||
require "resolv"
|
|
||||||
|
|
||||||
class Metasploit3 < Msf::Post
|
class Metasploit3 < Msf::Post
|
||||||
|
|
||||||
|
@ -125,7 +124,7 @@ class Metasploit3 < Msf::Post
|
||||||
|
|
||||||
# print out
|
# print out
|
||||||
dbs.each do |db|
|
dbs.each do |db|
|
||||||
if (!!(db[:Server] =~ Resolv::IPv4::Regex))
|
if ::Rex::Socket.is_ipv4?(db[:Server].to_s)
|
||||||
print_good("Reporting #{db[:Server]} ")
|
print_good("Reporting #{db[:Server]} ")
|
||||||
report_host(:host => db[:Server]);
|
report_host(:host => db[:Server]);
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue