Method: Rex::Socket.dotted_ip?

Defined in:
lib/rex/socket.rb

.dotted_ip?(addr) ⇒ Boolean

Checks to see if the supplied address is in “dotted” form

Returns:

  • (Boolean)


136
137
138
139
140
141
142
143
144
# File 'lib/rex/socket.rb', line 136

def self.dotted_ip?(addr)
  # Match IPv6
  return true if (support_ipv6? and addr =~ MATCH_IPV6)

  # Match IPv4
  return true if (addr =~ MATCH_IPV4)

  false
end