wok-current view linld/stuff/upx.sh @ rev 19870

linld: fix progname
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 30 15:54:03 2017 +0200 (2017-03-30)
parents fa2037599fb8
children
line source
1 #!/bin/sh
3 upx -5 $1
4 o=$(($(stat -c %s $1) - 15))
5 if dd bs=1 skip=$o if=$1 count=15 2> /dev/null | hd | \
6 grep -iq "2c e8 3c 01 77 f9 c1 04 08 29 34 ad e2 f1 c3"; then
7 echo "0 3C E8 75 FB 37 91 D3 04 91 |" | hexdump -R | \
8 dd bs=1 seek=$o of=$1 conv=notrunc 2> /dev/null
9 else
10 upx -d $1 > /dev/null 2>&1
11 upx -5 --8086 $1
12 fi