
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
restify-json-filtering
Advanced tools
Visit http://anyfetch.com for details about AnyFetch.
This is a custom restify formatter to filter properties on JSON objects according to some custom param fields
Let's say you have an endpoint /search
returning the following data:
{
"count": 2,
"next_page": "http://example.org/page3",
"prev_path": "http://example.org/page1",
"facets": {
"owners": {
"user": 0,
"admin": 2
},
"creators": {
"user": 1,
"admin": 2
}
},
"documents": [
{
"id": 1,
"name": "My document",
"snippet": "Some textual content"
},
{
"id": 2,
"name": "My other document",
"snippet": "Some textual content"
}
]
}
Once you setup this lib, when loading /search?fields=count,documents.id
you'll see:
{
"count": 2,
"documents": [
{
"id": 1
},
{
"id": 2
}
]
}
This should be a comma separated list of fields you want to retrieve. Arrays are "ignored" (see example above).
Leaving the parameter empty will not do any filtering.
Adding a trailing .
(dot) can be used to remove the content of an object (to count the number of items in an array without loading all the data).
var restify = require('restify');
// Replace "fields" by any name -- this will be used for the filtering data.
var restifyJsonFilterer = require('restify-json-filtering')('fields');
var server = restify.createServer({
formatters: {
'application/json': restifyJsonFilterer
}
});
// You need to add *at least* this middleware
server.use(restify.queryParser());
Support: support@anyfetch.com
.
FAQs
A formatter to filter json object with a fields param
The npm package restify-json-filtering receives a total of 0 weekly downloads. As such, restify-json-filtering popularity was classified as not popular.
We found that restify-json-filtering 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.