(host: str, port: int, timeout: float = 0.5)
| 342 | |
| 343 | |
| 344 | def local_port_open(host: str, port: int, timeout: float = 0.5) -> bool: |
| 345 | try: |
| 346 | with socket.create_connection((host, port), timeout=timeout): |
| 347 | return True |
| 348 | except Exception: |
| 349 | return False |
| 350 | |
| 351 | |
| 352 | def tor_binary() -> Optional[str]: |