Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
binary-extensions
Advanced tools
Package description
The binary-extensions npm package provides a list of binary file extensions. This package can be used to check if a file extension is generally considered to be binary. It is useful when handling file uploads, file processing, or any other file-related operations where knowing if a file is binary or text can be crucial.
Check if an extension is binary
This code checks if the 'png' extension is included in the list of binary extensions, indicating that files with this extension are binary.
const binaryExtensions = require('binary-extensions');
if (binaryExtensions.includes('png')) {
console.log('The file extension is binary.');
} else {
console.log('The file extension is not binary.');
}
This package provides a function to check if a given path is a binary file path. It is similar to binary-extensions but works with full file paths instead of just extensions.
As the counterpart to binary-extensions, text-extensions provides a list of text file extensions. It can be used to determine if a file extension is generally considered to be text, which is the opposite use case of binary-extensions.
Readme
List of binary file extensions
The list is just a JSON file and can be used wherever.
$ npm install binary-extensions
const binaryExtensions = require('binary-extensions');
console.log(binaryExtensions);
//=> ['3ds', '3g2', …]
MIT © Sindre Sorhus
FAQs
List of binary file extensions
We found that binary-extensions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.