A tool to get the Security Hash Algorightms (SHA) of all file in a given path.
Project description
A tool to get the Security Hash Algorightms (SHA) of all file in a given path.
The objective of this project is to provide a tool which give the SHAx representation of all file in a given tree/path.
Installation
From PyPi
$ pip3 install --user a-john-shots
We recommend the --user
flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.
From GitHub
$ pip3 install --user git+https://github.com/funilrys/A-John-Shots.git@master#egg=a-john-shots
We recommend the --user
flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.
Usage
CLI
usage: a-john-shots [-h] [-a ALGORITHM] [-d DESTINATION] [-e EXCLUDE] [-p PATH] [--print] [-s SEARCH] [--save] [-v] A John Shots - A tool to get the Security Hash Algorightms (SHA) of all file in a given path. optional arguments: -h, --help show this help message and exit -a ALGORITHM, --algorithm ALGORITHM The SHA algorithm to use. Can be ALL, SHA1, SHA224, SHA384 or SHA512 (default). -d DESTINATION, --destination DESTINATION Set the file we are going to write the JSON output to. -e EXCLUDE, --exclude EXCLUDE The (regex) pattern the filename has to match in order to be excluded from the output. -p PATH, --path PATH The file or directory path to read. --print Print the output. -s SEARCH, --search SEARCH The (regex) pattern the filename has to match in order to be included into the output. --save Save the output into a JSON file. -v, --version show program's version number and exit Crafted with ♥ by Nissar Chababy (Funilrys)
API
Help on function get in a_john_shots: a_john_shots.get = get(file_or_dir_path, sha='sha512', search=None, save=False, save_destination=None, exclude=None) Return the SHA representation of the given path children. .. note:: If :code:`file_or_dir_path` is a directory, we will get the SHA representation of all children files. .. note:: If :code:`file_or_dir_path` is a file, we will get the SHA representation of the given file. :param file_or_dir_path: The file or directory we are working with. :type file_or_dir_path: str :param sha: The SHA to use. Can be one of the following: :: - all - sha1 - sha224 - sha384 - sha513 :type sha: str :param search: The pattern the filename have to match in order to be taken in consideration. :type search: str :param save: Tell the system if we are allowed to save the result into a JSON file. .. note:: The default file name is :code:`faith-slosh.json`. .. note:: Even if this argument is set to :code:`True`, we return the dict representation if needed. :type save: bool :param save_destination: The destination file. :type save_destination: str :param exclude: The pattern the filename have to match in order to be excluded. :type exclude: str|list
License
MIT License Copyright (c) 2017-2019 Nissar Chababy <contact at funilrys dot com> 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.
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
a-john-shots-2.0.0.tar.gz
(8.8 kB
view details)
Built Distribution
File details
Details for the file a-john-shots-2.0.0.tar.gz
.
File metadata
- Download URL: a-john-shots-2.0.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5f2aa947b847acf1d5252c4be38e118c9d273961eb3bdaea9b40e521c81f8d9 |
|
MD5 | 206e73e07cdd9d9d48e57db5bb025027 |
|
BLAKE2b-256 | 7ae268a06219e8489e43d786def09a96aa90e46960ea5a871f1d775ef3093cfc |
File details
Details for the file a_john_shots-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: a_john_shots-2.0.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e86ef28de402e161bfd9fa43d8c2bdf5abfa98560ccd3d4fdb7e95783d039d8c |
|
MD5 | b2b5ba1942bda9f76f88ab500cb490fc |
|
BLAKE2b-256 | 57d21156525e6b61494dd282e50db8d4c8df9d0659d28f01081bf1faa70144b2 |