This is a copy of the community maintained fork of the open firmware which powers RNode devices. This version will have support for the hardware made by Mees Electronics.
 
 
 
 
 

19 lines
392 B

#!/bin/python
import os
import sys
import RNS
import json
import hashlib
major_version = None
minor_version = None
target_version = None
target_file = os.path.join(sys.argv[1])
firmware_data = open(target_file, "rb").read()
calc_hash = hashlib.sha256(firmware_data[0:-32]).digest()
part_hash = firmware_data[-32:]
if calc_hash == part_hash:
print(RNS.hexrep(part_hash, delimit=False))