Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
pydig is a python wrapper library for the 'dig' command line tool.
pydig follows SemVer (MAJOR.MINOR.PATCH) to track what is in each release.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Installation the package from pypi with your tool of choice pip
, poetry
or pipenv
.
pip install pydig
To use the default resolver you can call pydig.query
this resolver will use
the dig
command found in your $PATH
.
>>> import pydig
>>> pydig.query('example.com', 'A')
['93.184.216.34']
>>> pydig.query('www.github.com', 'CNAME')
['github.com.']
>>> pydig.query('example.com', 'NS')
['a.iana-servers.net.', 'b.iana-servers.net.']
If your want to adjust the executable location, the nameservers to dig will
query against or would like to pass additional arguments/flags, you can
configure your own instance of a resolver. and call the query
method of your
custom resolver.
>>> import pydig
>>> resolver = pydig.Resolver(
... executable='/usr/bin/dig',
... nameservers=[
... '1.1.1.1',
... '1.0.0.1',
... ],
... additional_args=[
... '+time=10',
... ]
... )
>>> resolver.query('example.com', 'A')
>>> ['93.184.216.34']
The code is 150~ lines with 100% test coverage
FAQs
Python wrapper library for the 'dig' command line tool
We found that pydig 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.