MCPcopy Index your code
hub / github.com/masterking32/MasterHttpRelayVPN / scan_sync

Function scan_sync

src/core/google_ip_scanner.py:177–194  ·  view source on GitHub ↗

Wrapper to run async scanner from sync context (e.g. main.py). Args: front_domain: The SNI hostname to use. Returns: True if at least one IP is reachable, False otherwise.

(front_domain: str)

Source from the content-addressed store, hash-verified

175
176
177def scan_sync(front_domain: str) -> bool:
178 """
179 Wrapper to run async scanner from sync context (e.g. main.py).
180
181 Args:
182 front_domain: The SNI hostname to use.
183
184 Returns:
185 True if at least one IP is reachable, False otherwise.
186 """
187 try:
188 return asyncio.run(run(front_domain))
189 except KeyboardInterrupt:
190 print("\nScan interrupted by user.")
191 return False
192 except Exception as e:
193 log.error(f"Scan failed: {e}")
194 return False

Callers 1

mainFunction · 0.90

Calls 1

runFunction · 0.85

Tested by

no test coverage detected