
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
The temp-dir npm package provides a simple way to get the path to the system's temporary directory. This can be useful for creating temporary files or directories that you don't need to persist between sessions.
Get Temporary Directory Path
This feature allows you to retrieve the path to the system's temporary directory. This is useful for creating temporary files or directories.
const tempDir = require('temp-dir');
console.log(tempDir);
The os-tmpdir package provides a similar functionality by returning the path of the operating system's default directory for temporary files. It is a lightweight package and can be used as an alternative to temp-dir.
The tmp package offers more advanced functionality for working with temporary files and directories. It can create temporary files and directories, and it also handles cleanup automatically. This makes it more feature-rich compared to temp-dir.
The temp package provides utilities for creating temporary files and directories, similar to tmp. It also includes features for tracking and cleaning up temporary files, making it a more comprehensive solution compared to temp-dir.
Get the real path of the system temp directory
The os.tmpdir()
built-in doesn't return the real path. That can cause problems when the returned path is a symlink, which is the case on macOS. Use this module to get the resolved path.
npm install temp-dir
import temporaryDirectory from 'temp-dir';
console.log(temporaryDirectory);
//=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T'
import os from 'node:os';
console.log(os.tmpdir());
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' // <= Symlink
FAQs
Get the real path of the system temp directory
The npm package temp-dir receives a total of 8,133,401 weekly downloads. As such, temp-dir popularity was classified as popular.
We found that temp-dir demonstrated a not healthy version release cadence and project activity because the last version was released 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 uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.