Revision 9757810488e595638996e7b84dace5787733e9c6 authored by 1p on 18 April 2014, 01:54:37 UTC, committed by 1p on 18 April 2014, 01:54:37 UTC
1 parent fa07825
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