Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
uuid_shortener is a library for shortening UUIDs into an alphanumerical format suitable for usage in URLs.
The alphanumerical format is Flicker base 58 encoding.
from Pypi:
pip install uuid-shortener-py
The UuidShortener
object can be created with/without a prefix.
from uuid_shortener import UuidShortener
from uuid import uuid4
if __name__ == "__main__":
print('******** Without prefix')
shortener = UuidShortener()
uuid_4 = uuid4()
short_uuid = shortener.shorten(uuid_4)
unshortened_uuid = shortener.unshorten(short_uuid)
print(f'Uuid to shorten: {uuid_4}')
print(f'shortened uuid: {short_uuid}')
print(f'unshortened uuid(original uuid): {shortener.unshorten(short_uuid)}')
******** Without prefix
Uuid to shorten: 177d1b53-77d5-42b2-8b8f-8d86579deb52
shortened uuid: 3Ueemi554rN46ioLFw3dZG
unshortened uuid(original uuid): 177d1b53-77d5-42b2-8b8f-8d86579deb52
from uuid_shortener import UuidShortener
from uuid import uuid4
if __name__ == "__main__":
print('******** With prefix')
shortener = UuidShortener('meow')
uuid_4 = uuid4()
short_uuid = shortener.shorten(uuid_4)
unshortened_uuid = shortener.unshorten(short_uuid)
print(f'Uuid to shorten: {uuid_4}')
print(f'shortened uuid: {short_uuid}')
print(f'unshortened uuid (original uuid): {shortener.unshorten(short_uuid)}')
******** With prefix
Uuid to shorten: 2bea23d4-2b96-485d-8788-0c606ab93319
shortened uuid: meow-6qwbaCZnHtxJsj4uJTKJSV
unshortened uuid (original uuid): 2bea23d4-2b96-485d-8788-0c606ab93319
from uuid_shortener import ShortUuidGenerator
from uuid import uuid4
if __name__ == "__main__":
print('******** Generator')
uuid_gen = ShortUuidGenerator(prefix='meow', uuid=uuid4)
print('Shortened uuid 1: {}'.format( uuid_gen() ))
print('Shortened uuid 2: {}'.format( uuid_gen() ))
******** Generator
Shortened uuid 1: meow-9ubC52uXU1MM9PcrUMaNNc
Shortened uuid 2: meow-wqTnxvHfWzrPvREcVi5RAf
FAQs
Shorten a uuid into a URL friendly format.
We found that uuid-shortener-py 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.