respodns/respodns/structs.py

34 lines
843 B
Python

from collections import namedtuple
from dataclasses import dataclass
@dataclass
class Options:
execution: object = None
ip_simul: int = 10 # how many IPs to connect to at once
domain_simul: int = 3 # how many domains per IP to request at once
ip_wait: float = 0.15
domain_wait: float = 0.25
impatient: bool = False # reduce retries and times for timeouts
early_stopping: bool = True # stop at the first invalid domain (best with dry)
dry: bool = True # don't write anything to database
progress: bool = False
@dataclass
class Entry:
from datetime import datetime
date: datetime
success: bool
server: str
kind: str
domain: str
exception: str
addrs: list # list of strings
reason: str
execution: object
Check = namedtuple("Check", ("kind", "domain"))