def __init__(self, subdomains, ports): self.subdomains = subdomains self.ports = ports self.threads = 20 self.lock = threading.BoundedSemaphore(value=self.threads)