DNS Bulk Lookup UtilityΒΆ

Resolution: Resolve a large number of domains to IPv4 and IPv6 addresses.

Copyright 2014 Damiano Boppart

This file is part of ECN-Spider.

resolution.Q_SIZE = 100

Maximum domain queue size

resolution.SLEEP = None

Time to sleep before each resolution, for crude rate-limiting.

resolution.TIMEOUT = None

The timeout for DNS resolution.

resolution.WWW = None

The value of the -www command line option

resolution.arguments(argv)[source]

Parse the command-line arguments.

Parameters:argv – The command line.
Returns:The return value of argparse.ArgumentParser.parse_args.
resolution.csv_gen(skip=0, count=0, *args, **kwargs)[source]

A wrapper around csv.reader(), that makes it a generator.

csv_gen() does not return entire records, instead it extracts one particular field from a record.

Parameters:
  • *args – Arguments passed to csv.reader().
  • **kwargs – Keyword arguments passed to csv.reader().
Returns:

One field from each record on each call to next().

resolution.main(argv)[source]

Method to be called when run from the command line.

resolution.resolve(domain, query='A')[source]

Resolve a domain name to IP address(es).

Parameters:
  • domain (str) – The domain to be resolved.
  • query (str) – The query type. May be either ‘A’ or ‘AAAA’.
Returns:

A list of IP addresses as strings.

Throws:

Instances of dns.exception

resolution.resolve_both(domain)[source]

Helper function to handle_domain.

Previous topic

Subset

Next topic

Unique

This Page