ch22: examples
This commit is contained in:
@@ -8,8 +8,10 @@ from netaddr import multi_probe
|
|||||||
|
|
||||||
|
|
||||||
async def main(tld: str) -> None:
|
async def main(tld: str) -> None:
|
||||||
names = (f'{w}.{tld}'.lower() for w in kwlist if len(w) <= 4)
|
tld = tld.strip('.')
|
||||||
async for name, found in multi_probe(sorted(names)):
|
names = (w.lower() for w in kwlist if len(w) <= 4)
|
||||||
|
domains = (f'{name}.{tld}' for name in names)
|
||||||
|
async for name, found in multi_probe(domains):
|
||||||
mark = '.' if found else '?\t\t'
|
mark = '.' if found else '?\t\t'
|
||||||
print(f'{mark} {name}')
|
print(f'{mark} {name}')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user