
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
anyfetch-file-hydrater
Advanced tools
Base library for file hydration on http://anyfetch.com.
Using this library requires a single function which takes a file path and metadatas, and returns more metadatas.
'use strict';
var anyfetchFileHydrater = require('anyfetch-file-hydrater');
/**
* Hydration function, to add metadatas to the document
*
* @param{Object} filePath Path to the file to hydrate, downloaded for you on the filesystem
* @param {Object} document Metadatas currently known (from previous hydraters, or from providers). Includes `document_type`, and `metadatas`.
*/
var myHydrationFunction = function(filePath, document, cb) {
// Do stuff with the file...
// Improve document...
cb(err, document);
};
var config = {
'hydrater_function': myHydrationFunction
};
var hydrationServer = anyfetchFileHydrater.createServer(config);
hydrationServer.listen(8000);
Now you're all done! Your server is running on port 8000.
Access /hydrate
with a standard AnyFetch POST request, and start hydrating your file.
POST <your_url>/hydrate
file_path: <url-file-to-hydrate>
callback: <url-to-ping>
document: {base document}
In some cases, you may want to override the lib and send the result yourself. To do so, you can use
cb.callbackUrl
to send datas back to the client, and then callcb()
without any error or document to finalize hydration, clean the file and start another task.
createServer()
takes an object hash for argument. hydrater_function
is mandatory, optional values includes:
concurrency
, max number of simultaneous calls to your hydrater function (default: 1)logger
function to use for logging error and success. Will get notified with strings when a task is started or ended. When an error occured, you'll get the path of the file, and the err as second argument.and not thrown).FAQs
Create file hydrater for AnyFetch.
The npm package anyfetch-file-hydrater receives a total of 1 weekly downloads. As such, anyfetch-file-hydrater popularity was classified as not popular.
We found that anyfetch-file-hydrater demonstrated a not healthy version release cadence and project activity because the last version was released 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.