
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
clitree
is a library to draw tree structures like the CLI utility tree
does.
Install it with:
pip install clitree
Example usage:
>>> from clitree import tree
>>>
>>> data = {
... "name": "root",
... "children": [
... {"name": "docs", "children": [
... {"name": "api.md", "children": []},
... {"name": "guide.md", "children": []}
... ]},
... {"name": "src", "children": [
... {"name": "main.py", "children": []},
... {"name": "utils", "children": [
... {"name": "helpers.py", "children": []},
... {"name": "config.py", "children": []}
... ]}
... ]},
... {"name": "tests", "children": []}
... ]
... }
>>>
>>> print(tree(data))
root
├── docs
│ ├── api.md
│ └── guide.md
├── src
│ ├── main.py
│ └── utils
│ ├── helpers.py
│ └── config.py
└── tests
name
: How to extract the name of a node. Can be:
node.get(name)
or getattr(node, name)
)children
: How to obtain the children of a node. Can be:
node.get(children)
or getattr(node, children)
)None
or empty iterable for leaf nodesWhen using string keys for name
and children
, nodes are typically:
get
method, orgetattr
However, since name
and children
can be callables, nodes can be of any type, as the callables are responsible for extracting the required information.
Requirements:
ValueError
: Raised when a node's name resolves to NoneTypeError
: Raised when children are not iterableFAQs
A library to draw tree structures like the CLI utility 'tree' does
We found that clitree demonstrated a healthy version release cadence and project activity because the last version was released less than 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
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.