
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
icon-extractor-labs
Advanced tools
Install:
npm install icon-extractor-labs
A nodejs package that returns base64 image data for a path's icon.
This is a simple nodejs wrapper around a .net executable that will extract icon image data from a given path and return it.
To get an icon's data you need to call the getIcon
function which takes two parameters.
The first is a context parameter. This will return with the icon data so you can have some information about what the return
data is for. The second parameter is the path of the file you want the icon for.
Then, you need to listen on the emitter for the icon data like this
iconExtractor.emitter.on('icon', function(iconData){ /*do stuff here*/ });
This data comes back as a json object containing three fields, Context
, Path
and Base64ImageData
Here is an example of it all put together
const IconExtractor = require('icon-extractor');
let iconExtractor = new IconExtractor();
iconExtractor.emitter.on('icon', function(data){
console.log('Here is my context: ' + data.Context);
console.log('Here is the path it was for: ' + data.Path);
console.log('Here is the base64 image: ' + data.Base64ImageData);
});
iconExtractor.getIcon('SomeContextLikeAName','c:\myexecutable.exe');
FAQs
Given a path, return base64 data of the icon used for that file
We found that icon-extractor-labs 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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.