File validation based on file signature.
Project description
file signature validation
Comprehensive tests to validate a file based on file signature.
Usage
pip install file-signature-validation
Methods
Tests the hashed file value against a dataset of known virus hashes (provided by MalwareBazaar)
virus_test(uploaded_file)
Tests the file name to ensure it is allowed.
regex_file_name_test(uploaded_file, allowed_extensions, regex)
Tests the file to ensure the file signature matches with the corressponeding mime type, extension and given size.
file_type_test(uploaded_file, allowed_type, allowed_mimes, allowed_extensions, allowed_size)
Runs the file through all of the above tests.
acceptable_file(uploaded_file, allowed_types, allowed_mimes, allowed_extensions, allowed_size, regex)
Disclaimer
The authors and contributors of this package can not be held liable for any false positives or damage caused by the use of the file signature validation package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file file_signature_validation-0.9.0.tar.gz
.
File metadata
- Download URL: file_signature_validation-0.9.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d159fced14a5cb088dc8cb065ddfb86e02597e1c406fc540828719136ecbcd48 |
|
MD5 | 162491329a0dfffb3c902d595f1fb823 |
|
BLAKE2b-256 | 6077728bcf6d7ea7c7f08691f937d25c678a8f4ab01976533b0de7432b0b6bd7 |
File details
Details for the file file_signature_validation-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: file_signature_validation-0.9.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a59846366277330fda2398d660dbbc04e5c06b270ee6ac261452f9b082e7118 |
|
MD5 | ede919b0452f06e39519739d863e420a |
|
BLAKE2b-256 | 1815240c6b71b1a99cc6d17d3c2624fb0b77b1ffdaa5ff699378ab79e720b42a |