
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.
Hierarchy expressed by the indent is converted into the JavaScript object.
Hierarchy expressed by the indent is converted into the JavaScript object.
$ npm install indent2obj
$ bower install indent2obj
<script type="text/javascript" src="indent2obj.js"></script>
input
looks like this.
depth1
depth2
depth2
depth3
depth1
depth1
dpeth2
The result is as follows.
var results = indent2obj(input);
console.log(results);
/*
[
{
name: "depth1",
children: [
{
name: "depth2",
children: []
},
{
name: "depth2",
children: [
{
name: "depth3",
children: []
}
]
}
]
},
{
name: "depth1",
children: []
},
{
name: "depth1",
children: [
{
name: "depth2",
children: []
}
]
}
]
*/
The default is to use 2 spaces.
If you want to the tab, Do the following.
indent2obj(input, "\t");
In the case of the 4 spaces.
indent2obj(input, " ");
indent2obj.defaultIndent = " ";
indent2obj.keys = {
name: "name",
children: "children"
};
Released under the MIT Licence
FAQs
Hierarchy expressed by the indent is converted into the JavaScript object.
We found that indent2obj 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.