SmoothGlue Malware Scan
A Python package that provides a library for interfacing with malware scanning utilities, currently only ClamAV.
Overview
smoothglue_malware_scan simplifies the process of scanning files for malware. The core problem it solves is providing a stop-check for incoming files to be scanned and either continue through the desired workflow if clean of malware and to follow a rejection workflow if malware is found.
Key Features
- Malware Scanning Wrappers: Easily interact with malware scanning utilities, currently only ClamAV.
- Custom Exceptions: A set of custom exceptions to easily use if malware is found or to help debug.
Installation
Prerequisites
- Python 3.9+
Install App From PyPI Package (Official Use)
-
Before installing the package, make sure that there is a virtual environment set up:
python -m venv venv source venv/bin/activate
-
Use pip and the following command:
pip install smoothglue_malware_scan
Usage
ClamAV
from smoothglue_malware_scan.scanners.clamav import ClamAVScanner
from smoothglue_malware_scan.exceptions import MalwareFoundException, ScanningServiceException
scanner = ClamAVScanner(clam_av_host="<clam av host name>", clam_av_port=3310)
with open("/tmp/mymalware.exe", "rb") as f:
try:
scanner.scan_stream(f.read())
except ScanningServiceException as e:
# Unable to connect to ClamAV server or ClamAV encountered an error scanning the file
# e.reason may have additional context
print("Error scan file")
except MalwareFoundException as e:
# ClamAV detected malware in the file. e.reason will be the type of malware detected
print(f"Detected {e.reason} in file")
else:
print("No malware detected")
License
This project is licensed under a Proprietary License. See the LICENSE file for more details.
Metadata
Release files for smoothglue_malware_scan 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smoothglue_malware_scan-1.0.0.tar.gz | 6.2 kB | Without provenance | Details for smoothglue_malware_scan-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smoothglue_malware_scan-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for smoothglue_malware_scan-1.0.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / smoothglue_malware_scan-1.0.0.tar.gz
| Download URL | smoothglue_malware_scan-1.0.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c76beca85e075ff0dbbb86ba16387296594d88680c89554ce6c754dc9bc136a
|
|
BLAKE2b-256 checksum How to use checksums |
40e34139dcd3ad893fb18a4747863f2fddb1f62ec0f32d684b67257c01086fe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.11 Linux/4.18.0-553.51.1.el8_10.x86_64
|
Release files / smoothglue_malware_scan-1.0.0-py3-none-any.whl
| Download URL | smoothglue_malware_scan-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40fe543d5288a82cd643dc6dc04bd43bde7c7032b066dd02ccb1b892009c2789
|
|
BLAKE2b-256 checksum How to use checksums |
c3546016226cdc871ecc0f302f5da0daefeca1f39de6c7086eb72644ba2c61bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.11 Linux/4.18.0-553.51.1.el8_10.x86_64
|
Security for smoothglue_malware_scan 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.