Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A simple and powerful tool to view project tree structure, file contents, and file information.
You can install Tree Values Viewer using pip:
pip install tree-values-viewer
Tree Values Viewer provides three main commands:
tree
: Display the project directory structurevalues
: View file contentsvalues-info
: Show file information including line countTo view the project directory structure:
view-project tree
Example output:
|____project_root/
|____src/
|____main.py
|____utils.py
|____tests/
|____test_main.py
|____README.md
To view the contents of all files in the project:
view-project values
This will display the content of each file, separated by a line of dashes.
To view information about files, including their line count:
view-project values-info
Example output:
+------------------------+------------+
| File Path | Line Count |
+------------------------+------------+
| ./src/main.py | 100 |
| ./src/utils.py | 50 |
| ./tests/test_main.py | 75 |
| ./README.md | 30 |
+------------------------+------------+
Total lines of code: 255
You can ignore specific files or directories using the --ignore
option:
view-project tree --ignore .env,.git,node_modules
view-project values --ignore .env,.git,node_modules
view-project values-info --ignore .env,.git,node_modules
This will exclude the specified files or directories from the output.
Clone the repository:
git clone https://github.com/keskinbu/tree-values-viewer.git
cd tree-values-viewer
Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Install the development dependencies:
pip install -r requirements-dev.txt
To run the tests:
python -m unittest discover tests
Install the required tools:
pip install setuptools wheel twine
Create distribution packages:
python setup.py sdist bdist_wheel
Upload to PyPI:
twine upload dist/* --repository-url https://upload.pypi.org/legacy/ -u __token__ -p $PYPI_API_TOKEN
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
FAQs
A tool to view project tree and file contents
We found that tree-values-viewer 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.