Revision 41818b9be7aaf71d90c615ee37a3af48cdd156fa authored by Alex on 29 March 2017, 12:37:33 UTC, committed by Alex on 29 March 2017, 12:37:33 UTC
1 parent 81f7c99
Raw File
firmsum.py
# python firmsum.py file offset length

import ctypes
import array
import string
import sys

f = open(sys.argv[1], 'rb')
f.seek( string.atoi( sys.argv[2], 16 ) )
firm = f.read( string.atoi( sys.argv[3], 16 ) )
f.close()
sum = sum( array.array('l', firm) )
print 'firsum=0x%x' % sum
back to top