diff options
author | root <root@filebitch> | 2011-08-28 18:28:51 +0200 |
---|---|---|
committer | root <root@filebitch> | 2011-08-28 18:28:51 +0200 |
commit | 1364c58cb6c97f24f4ade9d984ac71a846f5ef19 (patch) | |
tree | 8dc7fdffe8a239531d917b331c22885f7fc963c2 /oncology/dpfhack_display/fw/fulldump.py | |
parent | 8678f7ce47ed62c9db5446021955b89abbe3ab60 (diff) | |
parent | 7a97f9d4baff89bbcfa4bef93ab4d4246b2b82e6 (diff) |
Merge branch 'master' of https://github.com/krebscode/painload
Diffstat (limited to 'oncology/dpfhack_display/fw/fulldump.py')
-rwxr-xr-x | oncology/dpfhack_display/fw/fulldump.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/oncology/dpfhack_display/fw/fulldump.py b/oncology/dpfhack_display/fw/fulldump.py new file mode 100755 index 00000000..28c0ad2c --- /dev/null +++ b/oncology/dpfhack_display/fw/fulldump.py @@ -0,0 +1,29 @@ +# Script to extract flash +# +# <hackfin@section5.ch> +# +# Argument is either: +# +# /dev/sgX : scsi device (unhacked mode) +# usb0 : developer mode (already hacked) + +import sys +sys.path.append("./Debug") +import dpf + +import detect + +d = dpf.open(sys.argv[1]) + +size = detect.detect_flash(d) + +# Offset, size +print "Reading %x bytes..." % size +buf = d.readFlash(0x00, size) + +f = open("full.bin", "wb") +f.write(buf) +f.close() + +d.close() + |