Added SHA-256 to monkey exec logs
This commit is contained in:
parent
3174a97d3e
commit
3336956737
|
@ -107,9 +107,11 @@ class MonkeyDownload(flask_restful.Resource):
|
||||||
filepath = MonkeyDownload.get_executable_full_path(filename)
|
filepath = MonkeyDownload.get_executable_full_path(filename)
|
||||||
if os.path.isfile(filepath):
|
if os.path.isfile(filepath):
|
||||||
with open(filepath, 'rb') as monkey_exec_file:
|
with open(filepath, 'rb') as monkey_exec_file:
|
||||||
logger.debug("{} (SHA-512): {}".format(
|
file_contents = monkey_exec_file.read()
|
||||||
filepath,
|
logger.debug("{} hashes:\nSHA-512 {}\nSHA-256 {}".format(
|
||||||
hashlib.sha512(monkey_exec_file.read()).hexdigest())
|
filename,
|
||||||
)
|
hashlib.sha512(file_contents).hexdigest(),
|
||||||
|
hashlib.sha256(file_contents).hexdigest()
|
||||||
|
))
|
||||||
else:
|
else:
|
||||||
logger.debug("No monkey executable for {}.".format(filepath))
|
logger.debug("No monkey executable for {}.".format(filepath))
|
||||||
|
|
Loading…
Reference in New Issue