import hashlib
import argparse
import os
import sys

parser = argparse.ArgumentParser()
parser.add_argument('-path', dest='path', help='path')
args = parser.parse_args()


with open(str(args.path), "rb") as f:
        sha256obj = hashlib.sha256()
        console = f.read()
        sha256obj.update(console)
        hash_value = sha256obj.hexdigest()
file_name = "hash.txt"
now = hash_value.encode()
with open(file_name,'wb') as file_name:
    file_name.write(now)
