Use the generic extractor/encryptor for the x230 images as well

update
Hamish Coleman 8 years ago
parent bee7ced73e
commit c3d96cecc7

@ -28,11 +28,16 @@ install.radare.projects:
# alternatively, use the generic extractor
%.img.orig: xx30.extract %.img.orig.offset %.img.orig.sha1
./$< $@
./xx30.extract $@.offset $@
sha1sum -c $@.sha1
%.img.enc: %.encrypt %.img
./$< $(basename $<).img $@
# a generic encryptor
%.img.enc: %.img xx30.encrypt
./xx30.encrypt $< $@
# TODO
# - if we ever get generic extraction or encryption for more than
# just the Xx30 series, these generic rules will need to be reworked
# keep intermediate files
.PRECIOUS: %.img.orig
@ -63,5 +68,5 @@ mec-tools/mec_encrypt: mec-tools/Makefile
# TODO:
# - most of these dependancies could be automatically calculated
x220.8DHT34WW.extract: 8duj27us.iso.orig
x230.G2HT35WW.extract: g2uj23us.iso.orig mec-tools/mec_encrypt
x230.G2HT35WW.img.orig.offset: g2uj23us.iso.orig mec-tools/mec_encrypt
t430s.G7HT39WW.img.orig.offset: g7uj18us.iso.orig mec-tools/mec_encrypt

@ -1,23 +0,0 @@
#!/bin/bash
#
# Quick and dirty extracter to get the EC image out of the iso file
#
# 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
# assume that output filename is blahdyblah.img.orig
OUT1=$(basename "$OUT" .orig).enc.orig
set -x
dd if=g2uj23us.iso.orig bs=$[0x1076600] skip=1 | dd bs=196608 count=1 of="$OUT1"
mec-tools/mec_encrypt -d "$OUT1" >"$OUT"

@ -0,0 +1,2 @@
g2uj23us.iso.orig 0x1076600 196608

@ -6,15 +6,16 @@
# - a tool that is portable to Windows
# - should output dependancy information
OUT="$1"
if [ -z "$OUT" ]; then
echo Need output filename
INFOFILE="$1"
if [ ! -r "$INFOFILE" ]; then
echo Need file with source and offset info
exit 1
fi
shift
INFOFILE="$OUT.offset"
if [ ! -r "$INFOFILE" ]; then
echo Cannot find file with source and offset info
OUT="$1"
if [ -z "$OUT" ]; then
echo Need output filename
exit 1
fi

Loading…
Cancel
Save