Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_signature_validation-0.9.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file file_signature_validation-0.9.0.tar.gz.

File metadata

File hashes

Hashes for file_signature_validation-0.9.0.tar.gz
Algorithm Hash digest
SHA256 d159fced14a5cb088dc8cb065ddfb86e02597e1c406fc540828719136ecbcd48
MD5 162491329a0dfffb3c902d595f1fb823
BLAKE2b-256 6077728bcf6d7ea7c7f08691f937d25c678a8f4ab01976533b0de7432b0b6bd7

See more details on using hashes here.

File details

Details for the file file_signature_validation-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for file_signature_validation-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a59846366277330fda2398d660dbbc04e5c06b270ee6ac261452f9b082e7118
MD5 ede919b0452f06e39519739d863e420a
BLAKE2b-256 1815240c6b71b1a99cc6d17d3c2624fb0b77b1ffdaa5ff699378ab79e720b42a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page