Revision e726a83be4d064827da150950da94c5b18a43b06 authored by Alex on 12 January 2017, 20:20:36 UTC, committed by Alex on 12 January 2017, 20:20:36 UTC
2 parent s 48a5f30 + f208902
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