file-signature-validation


Namefile-signature-validation JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryFile validation based on file signature.
upload_time2024-08-26 15:30:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2024 overnitecbt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords file validation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "file-signature-validation",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "file, validation",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/60/77/728bcf6d7ea7c7f08691f937d25c678a8f4ab01976533b0de7432b0b6bd7/file_signature_validation-0.9.0.tar.gz",
    "platform": null,
    "description": "# file signature validation\r\n\r\n\r\nComprehensive tests to validate a file based on file signature.\r\n\r\n\r\n## Usage\r\n\r\n`pip install file-signature-validation`\r\n\r\n## Methods\r\n\r\nTests the hashed file value against a dataset of known virus hashes (provided by MalwareBazaar)\r\n\r\n`virus_test(uploaded_file)`\r\n\r\nTests the file name to ensure it is allowed.\r\n\r\n`regex_file_name_test(uploaded_file, allowed_extensions, regex)`\r\n\r\nTests the file to ensure the file signature matches with the corressponeding mime type, extension and given size.\r\n\r\n`file_type_test(uploaded_file, allowed_type, allowed_mimes, allowed_extensions, allowed_size)`\r\n\r\nRuns the file through all of the above tests.\r\n\r\n`acceptable_file(uploaded_file, allowed_types, allowed_mimes, allowed_extensions, allowed_size, regex)`\r\n\r\n\r\n## Disclaimer\r\n\r\nThe 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.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 overnitecbt  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "File validation based on file signature.",
    "version": "0.9.0",
    "project_urls": {
        "Homepage": "https://github.com/overnitecbt/file_signature_validation"
    },
    "split_keywords": [
        "file",
        " validation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1815240c6b71b1a99cc6d17d3c2624fb0b77b1ffdaa5ff699378ab79e720b42a",
                "md5": "ede919b0452f06e39519739d863e420a",
                "sha256": "3a59846366277330fda2398d660dbbc04e5c06b270ee6ac261452f9b082e7118"
            },
            "downloads": -1,
            "filename": "file_signature_validation-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ede919b0452f06e39519739d863e420a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 8724,
            "upload_time": "2024-08-26T15:30:05",
            "upload_time_iso_8601": "2024-08-26T15:30:05.722546Z",
            "url": "https://files.pythonhosted.org/packages/18/15/240c6b71b1a99cc6d17d3c2624fb0b77b1ffdaa5ff699378ab79e720b42a/file_signature_validation-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6077728bcf6d7ea7c7f08691f937d25c678a8f4ab01976533b0de7432b0b6bd7",
                "md5": "162491329a0dfffb3c902d595f1fb823",
                "sha256": "d159fced14a5cb088dc8cb065ddfb86e02597e1c406fc540828719136ecbcd48"
            },
            "downloads": -1,
            "filename": "file_signature_validation-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "162491329a0dfffb3c902d595f1fb823",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 7547,
            "upload_time": "2024-08-26T15:30:07",
            "upload_time_iso_8601": "2024-08-26T15:30:07.426796Z",
            "url": "https://files.pythonhosted.org/packages/60/77/728bcf6d7ea7c7f08691f937d25c678a8f4ab01976533b0de7432b0b6bd7/file_signature_validation-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-26 15:30:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "overnitecbt",
    "github_project": "file_signature_validation",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "file-signature-validation"
}
        
Elapsed time: 0.63044s