DNS Helper¶
-
class
pathspider.helpers.dns.PSDNSRecord(header=None, questions=None, rr=None, q=None, a=None, auth=None, ar=None)[source]¶ -
spider_send(source, job, conn_timeout, tcp=False, sockopts=None)[source]¶ Send packet to nameserver and return response and source port.
Parameters: - source (str) – source address for the connection
- job (dict) – dictionary containing the job details
- tcp (bool) – perform connection using TCP if True, otherwise UDP
- sockopts (list(tuple)) – list of socket options to set on the connection socket as tuples containing the level, option and value
-
-
pathspider.helpers.dns.connect_dns(source, job, conn_timeout, tcp=False, sockopts=None)[source]¶ This helper function will perform a DNS query over a TCP connection. It will not perform any special action in the event that this is the experimental flow, it only performs a DNS query connection.
Parameters: - source (str) – source address for the connection
- job (dict) – dictionary containing the job details
- tcp (bool) – perform connection using TCP if True, otherwise UDP
- sockopts (list(tuple)) – list of socket options to set on the connection socket as tuples containing the level, option and value
-
pathspider.helpers.dns.connect_dns_tcp(*args, **kwargs)[source]¶ This helper function will perform a DNS query over a TCP connection. It will not perform any special action in the event that this is the experimental flow, it only performs a DNS query connection.
Deprecated since version 2.1.0.
Use
pathspider.helpers.dns.connect_dns()instead.Parameters: - args (list) – positional arguments for
pathspider.helpers.dns.connect_dns() - kwargs (dict) – keyword arguments for
pathspider.helpers.dns.connect_dns()
- args (list) – positional arguments for
-
pathspider.helpers.dns.connect_dns_udp(*args, **kwargs)[source]¶ This helper function will perform a DNS query over a TCP connection. It will not perform any special action in the event that this is the experimental flow, it only performs a DNS query connection.
Deprecated since version 2.1.0.
Use
pathspider.helpers.dns.connect_dns()instead.Parameters: - args (list) – positional arguments for
pathspider.helpers.dns.connect_dns() - kwargs (dict) – keyword arguments for
pathspider.helpers.dns.connect_dns()
- args (list) – positional arguments for