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.
The Snowflake generator done right.
See here for additional information.
Python 3.8 and above. No additional dependencies.
pip install snowflake-id
from snowflake import SnowflakeGenerator
gen = SnowflakeGenerator(42)
for i in range(100):
val = next(gen)
print(val)
6820698575169822721
6820698575169822722
6820698575169822723
6820698575174017024
6820698575174017025
...
from snowflake import Snowflake
sf = Snowflake.parse(856165981072306191, 1288834974657)
print(f"{sf.timestamp = }")
print(f"{sf.instance = }")
print(f"{sf.epoch = }")
print(f"{sf.seq = }")
print(f"{sf.seconds = }")
print(f"{sf.milliseconds = }")
print(f"{sf.datetime = }")
print(f"{int(sf) = }")
sf.timestamp = 204125876682
sf.instance = 363
sf.epoch = 1288834974657
sf.seq = 15
sf.seconds = 1492960851.339
sf.milliseconds = 1492960851339
sf.datetime = datetime.datetime(2017, 4, 23, 15, 20, 51, 339000)
int(sf) = 856165981072306191
from snowflake import SnowflakeGenerator, Snowflake
sf = Snowflake.parse(856165981072306191, 1288834974657)
gen = SnowflakeGenerator.from_snowflake(sf)
for i in range(100):
val = next(gen)
print(val)
1414934653136449536
1414934653136449537
1414934653136449538
1414934653136449539
1414934653136449540
...
FAQs
The Snowflake generator done right
We found that snowflake-id 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.