privex.helpers.net

Network related helper code

Copyright:

    +===================================================+
    |                 © 2019 Privex Inc.                |
    |               https://www.privex.io               |
    +===================================================+
    |                                                   |
    |        Originally Developed by Privex Inc.        |
    |        License: X11 / MIT                         |
    |                                                   |
    |        Core Developer(s):                         |
    |                                                   |
    |          (+)  Chris (@someguy123) [Privex]        |
    |          (+)  Kale (@kryogenic) [Privex]          |
    |                                                   |
    +===================================================+

Copyright 2019     Privex Inc.   ( https://www.privex.io )

Functions

asn_to_name(as_number[, quiet])

Look up an integer Autonomous System Number and return the human readable name of the organization.

get_rdns(host[, throw])

Look up the reverse DNS hostname for host and return it as a string.

get_rdns_multi(*hosts[, throw])

Resolve reverse DNS hostnames for multiple IPs / domains specified as positional arguments.

ip4_to_rdns(ip_obj[, v4_boundary, boundary])

Internal function for getting the rDNS domain for a given v4 address.

ip6_to_rdns(ip_obj[, v6_boundary, boundary])

Internal function for getting the rDNS domain for a given v6 address.

ip_is_v4(ip)

Determines whether an IP address is IPv4 or not

ip_is_v6(ip)

Determines whether an IP address is IPv6 or not

ip_to_rdns(ip[, boundary, v6_boundary, …])

Converts an IPv4 or IPv6 address into an in-addr domain

ping(ip[, timeout])

Sends a ping to a given IPv4 / IPv6 address.

resolve_ip(addr[, version, v4_convert])

Wrapper for resolve_ips() - passes args to resolve_ips() and returns the first item from the results.

resolve_ips(addr[, version, v4_convert])

With just a single hostname argument, both IPv4 and IPv6 addresses will be returned as strings.

resolve_ips_multi(*addr[, version, v4_convert])

Resolve IPv4/v6 addresses for multiple hosts specified as positional arguments.