Autor Tema: Como compilar el compresor de ejecutables UPX  (Leído 120 veces)


  • Administrador
  • Usuario Héroe
  • *****
  • Mensajes: 7611
Como compilar el compresor de ejecutables UPX
« en: 04 de Enero de 2021, 04:22:20 pm »

UPX is a free, portable, extendable, high-performance executable packer for several executable formats.

UPX achieves an excellent compression ratio and offers very fast decompression. Your executables suffer no memory overhead or other drawbacks for most of the formats supported, because of in-place decompression. UPX strengths in a nutshell:

excellent compression ratio: typically compresses better than WinZip/zip/gzip, use UPX to decrease the size of your distribution!
very fast decompression: ~10 MB/sec on an ancient Pentium 133, ~200 MB/sec on an Athlon XP 2000+.
no memory overhead for your compressed executables because of in-place decompression.
safe: you can list, test and unpack your executables. Also, a checksum of both the compressed and uncompressed file is maintained internally.
universal: UPX can pack a number of executable formats.
portable: UPX is written in portable endian-neutral C++.
extendable: because of the class layout it's very easy to add new executable formats or new compression algorithms.
free: UPX is distributed with full source code under the GNU General Public License v2+, with special exceptions granting the free usage for commercial programs as stated in the UPX License Agreement.
You probably understand now why we call UPX the "Ultimate Packer for eXecutables".

Llevo usándolo desde 1996  :fuckyeah:

Adjunto script y binario compilado x86_64

Código: [Seleccionar]
# upx/ucl bash compiler
# by KAPITALSIN 2o21

git clone
cd upx
git submodule update --init --recursive
tar xvfa ucl-1.03.tar.gz
cd ucl-1.03
export CPPFLAGS="$CPPFLAGS -std=c90 -fPIC"
./configure  --enable-static  --disable-shared
make -j$(nproc)
export UPX_UCLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ../src
sed -i 's/.out/.git-$(UPX_VERSION_GITREV).bin/g' Makefile
make -j$(nproc) LDFLAGS="--static"
strip upx.*.bin && ./upx*.bin --ultra-brute upx*.bin
mv upx*.bin ..

Siempre que pasa igual sucede lo mismo