
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
smartcrop
Advanced tools
smartcrop implementation in Python.
smartcrop finds good crops for arbitrary images and crop sizes, based on Jonas Wagner's smartcrop.js.

Python requirements are defined in pyproject.toml.
pip3 install -U pip setuptools wheel # optional but recommended
pip3 install smartcrop
or directly from GitHub:
pip3 install -U pip setuptools wheel # optional but recommended
pip install -e git+git://github.com/smartcrop/smartcrop.py.git@master#egg=smartcrop
Use the basic command-line tool:
$ smartcroppy --help
usage: smartcroppy [-h] [--debug-file DEBUG_FILE] [--width WIDTH] [--height HEIGHT] INPUT_FILE OUTPUT_FILE
positional arguments:
INPUT_FILE Input image file
OUTPUT_FILE Output image file
options:
-h, --help show this help message and exit
--debug-file DEBUG_FILE
Debugging image file
--width WIDTH Crop width
--height HEIGHT Crop height
Processing an image:
smartcroppy --width 300 --height 300 tests/images/business-work-1.jpg output.jpg --debug-file debug.jpg
Or use the module it in your code (this is a really basic example, see examples/ and smartcrop/cli.py for inspiration):
import json
import sys
import smartcrop
from PIL import Image
image = Image.open(sys.argv[1])
cropper = smartcrop.SmartCrop()
result = cropper.crop(image, 100, 100)
print(json.dumps(result, indent=2))
Install dependencies for testing, then call pytest:
pip3 install smartcrop[test]
pytest
MIT
FAQs
smartcrop implementation in Python
We found that smartcrop 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
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.