
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
Device-Fingerprint
Advanced tools
Python library to generate a unique device fingerprint based on physical characteristics
device_fingerprint is a Python library designed to generate a unique digital fingerprint based on the physical characteristics of an electronic device. It captures details like the device's battery status, exact system time (with millisecond precision), and MAC address. This library also provides secure handling of data by hashing with SHA-256 and encrypting using AES encryption.
To install the device_fingerprint library, use pip:
pip install device-fingerprint
Here's how to use the device_fingerprint library to generate a unique fingerprint:
from device_fingerprint import DeviceFingerprint
# Define a 16-byte key for AES encryption
# AES key must be either 16, 24, or 32 bytes long
key = b'ThisIs16BytesKey!'
# Initialize the DeviceFingerprint class with your encryption key
fingerprint_generator = DeviceFingerprint(encryption_key=key)
# Generate a unique fingerprint for the device
fingerprint = fingerprint_generator.generate_fingerprint()
print(f"Fingerprint: {fingerprint}")
# Retrieve the device's MAC address
mac_address = fingerprint_generator.get_mac_address()
print(f"MAC Address: {mac_address}")
# Encrypt and decrypt data
encrypted_mac = fingerprint_generator.encrypt_data(mac_address)
print(f"Encrypted MAC Address: {encrypted_mac}")
decrypted_mac = fingerprint_generator.decrypt_data(encrypted_mac)
print(f"Decrypted MAC Address: {decrypted_mac}")
DeviceFingerprintConstructor: DeviceFingerprint(encryption_key: bytes)
DeviceFingerprint class with the specified AES encryption key.encryption_key: A byte string for AES encryption. Must be 16, 24, or 32 bytes long.Method: generate_fingerprint()
Method: get_mac_address()
Method: encrypt_data(data: str)
data: A string of data to encrypt.Method: decrypt_data(encrypted_data: str)
encrypted_data: A string of encrypted data.Feel free to adjust the repository links and license details as needed.
FAQs
Python library to generate a unique device fingerprint based on physical characteristics
We found that Device-Fingerprint 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.