
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
DNS over HTTPS based on aiohttp and async_dns.
$ pip install async-doh
usage: python3 -m async_doh.client [-h] [-n NAMESERVERS [NAMESERVERS ...]] [-t TYPES [TYPES ...]] hostnames [hostnames ...]
Async DNS resolver with DoH
positional arguments:
hostnames the hostnames to query
optional arguments:
-h, --help show this help message and exit
-n NAMESERVERS [NAMESERVERS ...], --nameservers NAMESERVERS [NAMESERVERS ...]
name servers
-t TYPES [TYPES ...], --types TYPES [TYPES ...]
query types, default as `any`
Examples:
$ python3 -m async_doh.client -n https://223.5.5.5/dns-query -t ANY -- www.google.com
import asyncio
import aiohttp
from async_doh.client import DoHClient
async def main():
async with DoHClient() as client:
result = await client.query('https://1.1.1.1/dns-query', 'www.google.com', 'A')
print('query:', result)
result = await client.query_json('https://1.1.1.1/dns-query', 'www.google.com', 'A')
print('query_json:', result)
asyncio.run(main())
from aiohttp import web
from async_doh.server import application
web.run(application)
Now you have http://localhost:8080/dns-query
as an endpoint.
By importing the patch, async_dns will use aiohttp to send queries through HTTPS (aka DNS over HTTPS):
import asyncio
from async_dns.core import types
from async_dns.resolver import ProxyResolver
from async_doh.client import patch
async def main():
revoke = await patch()
resolver = ProxyResolver(proxies=['https://dns.alidns.com/dns-query'])
res, _ = await resolver.query('www.google.com', types.A)
print(res)
await revoke()
asyncio.run(main())
FAQs
DNS over HTTPS based on aiohttp and async_dns
We found that async-doh demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.