Make the binary slice extraction completely generic

update
Hamish Coleman 8 years ago
parent 5e4466c1aa
commit 1fafacbc59

@ -27,15 +27,11 @@ install.radare.projects:
sha1sum -c $<
touch $@
# Generate orig images so that we can diff against them later
# If we have an extractor for this image, use it
%.img.orig: %.extract %.img.orig.sha1
./$< $@
sha1sum -c $@.sha1
# Generate all the orig images so that we can diff against them later
# alternatively, use the generic extractor
%.img.enc.orig: %.img.enc.orig.offset xx30.extract
./xx30.extract $< $@
# a the generic binary extractor
%: %.slice slice.extract
./slice.extract $< $@
%.img.orig: %.img.enc.orig %.img.orig.sha1 mec-tools/mec_encrypt
mec-tools/mec_encrypt -d $< >$@
@ -78,7 +74,7 @@ mec-tools/mec_encrypt: mec-tools/Makefile
#
# TODO:
# - most of these dependancies could be automatically calculated
x220.8DHT34WW.extract: 8duj27us.iso.orig
x220.8DHT34WW.img.enc.orig: 8duj27us.iso.orig
x230.G2HT35WW.img.enc.orig: g2uj23us.iso.orig
t430.G1HT35WW.img.enc.orig: g1uj38us.iso.orig
t430s.G7HT39WW.img.enc.orig: g7uj18us.iso.orig

@ -1,6 +1,6 @@
#!/bin/bash
#
# Quick and dirty extracter to get the EC image out of the iso file
# Quick and dirty extracter to slice out a section of a binary file
# Copyright (C) 2016 Hamish Coleman
#
# TODO:

@ -1,18 +0,0 @@
#!/bin/bash
#
# Quick and dirty extracter to get the EC image out of the iso file
# Copyright (C) 2016 Hamish Coleman
#
# TODO:
# - a tool that is portable to Windows
# - should output dependancy information
OUT="$1"
if [ -z "$OUT" ]; then
echo Need output filename
exit 1
fi
set -x
dd if=8duj27us.iso.orig bs=$[0x005e2a00] skip=1 | dd bs=196608 count=1 of="$OUT"

@ -0,0 +1 @@
8duj27us.iso.orig 0x005e2a00 196608
Loading…
Cancel
Save