
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
py-machineid
Advanced tools
Get the unique machine ID of any host (without admin privileges).
Sponsored by:
A fair source software licensing and distribution API.
Install using pip:
python3 -m pip install py-machineid
To obtain the raw GUID of the device, use id() -> str:
import machineid
print(machineid.id())
To obtain an anonymized (hashed) version of the GUID, see below. The
hashed_id(str) -> str function takes an optional application ID,
which will ensure a unique ID per-app for the same device.
import machineid
print(machineid.hashed_id('myappid'))
print(machineid.hashed_id())
Both id() and hashed_id() accept a winregistry: bool kwarg,
which can be used to disable the registry query on Windows (enabled
by default). Depending on your security posture, disabling the
registry query may help prevent machine fingerprints from
being manually modified by a bad actor.
To run tests, invoke unittest:
python3 -m unittest
To build a release, run:
python3 setup.py sdist bdist_wheel
To publish a release, run:
twine upload dist/*
Special thanks to Denis Brodbeck for his Go package, machineid.
FAQs
Get the unique machine ID of any host (without admin privileges)
We found that py-machineid 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.