Skip to content

Incorrectly classes IP address as domain name #77

@sjanusz-r7

Description

@sjanusz-r7

Example:

Rex::Socket.is_name?('192.168.1.0')
=> true

Expected behaviour:

Rex::Socket.is_name?('192.168.1.0')
=> false

Example change to the regex being used, taken from https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html:

MATCH_DNS_NAME = /^\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b$/i

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions