Hello Tommi!
13 Mar 2015 17:09, Tommi Koivula wrote to Benny Pedersen:
TK> On 13.3.2015 14:16, Benny Pedersen -> Tommi Koivula wrote:
TK>>> I repeat, how can I tell hpt to process arcmail bundles in insecure
TK>>> inbound?
BP>> ----- Unpack begins -----
BP>> Unpack "arc x $a $p'*.*' $f" 0 1a
BP>> Unpack "lha -eifw=$p $a $f" 2 2d6c68
BP>> Unpack "unrar e -y $a $p $f \* > /dev/null" 0 52617221
BP>> Unpack "unzip -joLqq $a -d $p $f" 0 504b0304
BP>> Unpack "unace e $a $p $f \* > /dev/null" 7 2A2A4143452A2A
BP>> ----- Unpack ends -----
BP>> dont know if that helps non linux users
TK> C'mon Benny, I'm sure you knew what I was talking about.
----- unpacker.sh begins -----
#!/bin/sh
#
# Scriptet der pakker echomail bundles ud
echo "Unpacking.."
function locate_exe() {
EXE=`whereis -b $1|cut -d ' ' -f 2`
}
cd $INBOUND
for i in `find -regextype posix-egrep -regex
"^.*\.(mo|tu|we|th|fr|sa|su)[0-9]$"|xargs`
do
FOUT=`file $i|cut -f 2 -d ' '`
case $FOUT in
"LHa")
locate_exe "lha"
$EXE x $i
;;
"Zip")
locate_exe "unzip"
$EXE -oj $i
;;
"ARJ")
locate_exe "arj"
$EXE e $i
;;
"RAR")
locate_exe "unrar"
$EXE $i
;;
esac
if [ $? == 0 ];
then
rm $i
fi
done
----- unpacker.sh ends -----
take care of to make it unpack in current dir where hpt toss inbound insecure,
do not use it for secure bundles unless inspirated to make that work aswell :=)
Regards Benny
... there can only be one way of life, and it works :)
--- Msged/LNX 6.2.0 (Linux/4.9.3-gentoo (i686))
* Origin: openvpn on its way here (2:230/0)
|