Revert "Change temporary directory name, clean more things"

This reverts commit 302f20e089.
bug/bundler_fix
Joshua J. Drake 2013-01-07 22:04:38 -06:00
parent 18a1a25316
commit d9789534ad
1 changed files with 32 additions and 35 deletions

View File

@ -48,47 +48,47 @@ external/source/meterpreter/source/bionic/compiled/libdl.so:
$(MAKE) -C $(BIONIC)/libdl && [ -f $(BIONIC)/libdl/libdl.so ] $(MAKE) -C $(BIONIC)/libdl && [ -f $(BIONIC)/libdl/libdl.so ]
cp $(BIONIC)/libdl/libdl.so $(COMPILED)/libdl.so cp $(BIONIC)/libdl/libdl.so $(COMPILED)/libdl.so
external/source/meterpreter/source/bionic/compiled/libcrypto.so: posix-meterp-build-tmp/openssl-0.9.8o/libssl.so external/source/meterpreter/source/bionic/compiled/libcrypto.so: tmp/openssl-0.9.8o/libssl.so
cp posix-meterp-build-tmp/openssl-0.9.8o/libcrypto.so external/source/meterpreter/source/bionic/compiled/libcrypto.so cp tmp/openssl-0.9.8o/libcrypto.so external/source/meterpreter/source/bionic/compiled/libcrypto.so
external/source/meterpreter/source/bionic/compiled/libssl.so: posix-meterp-build-tmp/openssl-0.9.8o/libssl.so external/source/meterpreter/source/bionic/compiled/libssl.so: tmp/openssl-0.9.8o/libssl.so
cp posix-meterp-build-tmp/openssl-0.9.8o/libssl.so external/source/meterpreter/source/bionic/compiled/libssl.so cp tmp/openssl-0.9.8o/libssl.so external/source/meterpreter/source/bionic/compiled/libssl.so
posix-meterp-build-tmp/openssl-0.9.8o/libssl.so: tmp/openssl-0.9.8o/libssl.so:
[ -d posix-meterp-build-tmp ] || mkdir posix-meterp-build-tmp [ -d tmp ] || mkdir tmp
[ -d posix-meterp-build-tmp/openssl-0.9.8o ] || wget -O posix-meterp-build-tmp/openssl-0.9.8o.tar.gz http://openssl.org/source/openssl-0.9.8o.tar.gz [ -d tmp/openssl-0.9.8o ] || wget -O tmp/openssl-0.9.8o.tar.gz http://openssl.org/source/openssl-0.9.8o.tar.gz
[ -f posix-meterp-build-tmp/openssl-0.9.8o/Configure ] || tar -C posix-meterp-build-tmp/ -xzf posix-meterp-build-tmp/openssl-0.9.8o.tar.gz [ -f tmp/openssl-0.9.8o/Configure ] || tar -C tmp/ -xzf tmp/openssl-0.9.8o.tar.gz
(cd posix-meterp-build-tmp/openssl-0.9.8o && \ (cd tmp/openssl-0.9.8o && \
cat Configure | grep -v 'linux-msf' | \ cat Configure | grep -v 'linux-msf' | \
sed -e 's#my %table=(#my %table=( \ sed -e 's#my %table=(#my %table=( \
"linux-msf", "gcc:$(OSSL_CFLAGS) -DL_ENDIAN -DTERMIO -Wall::$(OSSL_CFLAGS) -D_REENTRANT::$(OSSL_CFLAGS) -ldl:BN_LLONG $${x86_gcc_des} $${x86_gcc_opts}:$${x86_elf_asm}:dlfcn:linux-shared:$(OSSL_CFLAGS) -fPIC::.so.\\$$\\$$(SHLIB_MAJOR).\\$$\\$$(SHLIB_MINOR)",\ "linux-msf", "gcc:$(OSSL_CFLAGS) -DL_ENDIAN -DTERMIO -Wall::$(OSSL_CFLAGS) -D_REENTRANT::$(OSSL_CFLAGS) -ldl:BN_LLONG $${x86_gcc_des} $${x86_gcc_opts}:$${x86_elf_asm}:dlfcn:linux-shared:$(OSSL_CFLAGS) -fPIC::.so.\\$$\\$$(SHLIB_MAJOR).\\$$\\$$(SHLIB_MINOR)",\
#;' > Configure-msf;\ #;' > Configure-msf;\
cp Configure-msf Configure && chmod +x Configure && \ cp Configure-msf Configure && chmod +x Configure && \
grep linux-msf Configure && \ grep linux-msf Configure && \
./Configure --prefix=/posix-meterp-build-tmp/out threads shared no-hw no-dlfcn no-zlib no-krb5 no-idea 386 linux-msf \ ./Configure --prefix=/tmp/out threads shared no-hw no-dlfcn no-zlib no-krb5 no-idea 386 linux-msf \
) )
(cd posix-meterp-build-tmp/openssl-0.9.8o && make depend all ; [ -f libssl.so.0.9.8 -a -f libcrypto.so.0.9.8 ] ) (cd tmp/openssl-0.9.8o && make depend all ; [ -f libssl.so.0.9.8 -a -f libcrypto.so.0.9.8 ] )
mkdir -p external/source/meterpreter/source/openssl/lib/linux/i386/ mkdir -p external/source/meterpreter/source/openssl/lib/linux/i386/
cp posix-meterp-build-tmp/openssl-0.9.8o/libssl.so* posix-meterp-build-tmp/openssl-0.9.8o/libcrypto.so* external/source/meterpreter/source/openssl/lib/linux/i386/ cp tmp/openssl-0.9.8o/libssl.so* tmp/openssl-0.9.8o/libcrypto.so* external/source/meterpreter/source/openssl/lib/linux/i386/
external/source/meterpreter/source/bionic/compiled/libpcap.so: posix-meterp-build-tmp/libpcap-1.1.1/libpcap.so.1.1.1 external/source/meterpreter/source/bionic/compiled/libpcap.so: tmp/libpcap-1.1.1/libpcap.so.1.1.1
cp posix-meterp-build-tmp/libpcap-1.1.1/libpcap.so.1.1.1 external/source/meterpreter/source/bionic/compiled/libpcap.so cp tmp/libpcap-1.1.1/libpcap.so.1.1.1 external/source/meterpreter/source/bionic/compiled/libpcap.so
posix-meterp-build-tmp/libpcap-1.1.1/libpcap.so.1.1.1: tmp/libpcap-1.1.1/libpcap.so.1.1.1:
[ -d posix-meterp-build-tmp ] || mkdir posix-meterp-build-tmp [ -d tmp ] || mkdir tmp
[ -f posix-meterp-build-tmp/libpcap-1.1.1.tar.gz ] || wget -O posix-meterp-build-tmp/libpcap-1.1.1.tar.gz http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz [ -f tmp/libpcap-1.1.1.tar.gz ] || wget -O tmp/libpcap-1.1.1.tar.gz http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
[ -f posix-meterp-build-tmp/libpcap-1.1.1/configure ] || tar -C posix-meterp-build-tmp -xzf posix-meterp-build-tmp/libpcap-1.1.1.tar.gz [ -f tmp/libpcap-1.1.1/configure ] || tar -C tmp -xzf tmp/libpcap-1.1.1.tar.gz
(cd posix-meterp-build-tmp/libpcap-1.1.1 && ./configure --disable-bluetooth --without-bluetooth --without-usb --disable-usb --without-can --disable-can --without-usb-linux --disable-usb-linux --without-libnl) (cd tmp/libpcap-1.1.1 && ./configure --disable-bluetooth --without-bluetooth --without-usb --disable-usb --without-can --disable-can --without-usb-linux --disable-usb-linux --without-libnl)
echo '#undef HAVE_DECL_ETHER_HOSTTON' >> posix-meterp-build-tmp/libpcap-1.1.1/config.h echo '#undef HAVE_DECL_ETHER_HOSTTON' >> tmp/libpcap-1.1.1/config.h
echo '#undef HAVE_SYS_BITYPES_H' >> posix-meterp-build-tmp/libpcap-1.1.1/config.h echo '#undef HAVE_SYS_BITYPES_H' >> tmp/libpcap-1.1.1/config.h
echo '#undef PCAP_SUPPORT_CAN' >> posix-meterp-build-tmp/libpcap-1.1.1/config.h echo '#undef PCAP_SUPPORT_CAN' >> tmp/libpcap-1.1.1/config.h
echo '#undef PCAP_SUPPORT_USB' >> posix-meterp-build-tmp/libpcap-1.1.1/config.h echo '#undef PCAP_SUPPORT_USB' >> tmp/libpcap-1.1.1/config.h
echo '#undef HAVE_ETHER_HOSTTON' >> posix-meterp-build-tmp/libpcap-1.1.1/config.h echo '#undef HAVE_ETHER_HOSTTON' >> tmp/libpcap-1.1.1/config.h
echo '#define _STDLIB_H this_works_around_malloc_definition_in_grammar_dot_c' >> posix-meterp-build-tmp/libpcap-1.1.1/config.h echo '#define _STDLIB_H this_works_around_malloc_definition_in_grammar_dot_c' >> tmp/libpcap-1.1.1/config.h
(cd posix-meterp-build-tmp/libpcap-1.1.1 && patch --dry-run -p0 < ../../external/source/meterpreter/source/libpcap/pcap_nametoaddr_fix.diff && patch -p0 < ../../external/source/meterpreter/source/libpcap/pcap_nametoaddr_fix.diff) (cd tmp/libpcap-1.1.1 && patch --dry-run -p0 < ../../external/source/meterpreter/source/libpcap/pcap_nametoaddr_fix.diff && patch -p0 < ../../external/source/meterpreter/source/libpcap/pcap_nametoaddr_fix.diff)
sed -i -e s/pcap-usb-linux.c//g -e s/fad-getad.c/fad-gifc.c/g posix-meterp-build-tmp/libpcap-1.1.1/Makefile sed -i -e s/pcap-usb-linux.c//g -e s/fad-getad.c/fad-gifc.c/g tmp/libpcap-1.1.1/Makefile
sed -i -e s^"CC = gcc"^"CC = gcc $(PCAP_CFLAGS)"^g posix-meterp-build-tmp/libpcap-1.1.1/Makefile sed -i -e s^"CC = gcc"^"CC = gcc $(PCAP_CFLAGS)"^g tmp/libpcap-1.1.1/Makefile
make -C posix-meterp-build-tmp/libpcap-1.1.1 make -C tmp/libpcap-1.1.1
data/meterpreter/msflinker_linux_x86.bin: external/source/meterpreter/source/server/rtld/msflinker.bin data/meterpreter/msflinker_linux_x86.bin: external/source/meterpreter/source/server/rtld/msflinker.bin
@ -137,20 +137,17 @@ clean:
depclean: depclean:
rm -f external/source/meterpreter/source/bionic/lib*/*.o rm -f external/source/meterpreter/source/bionic/lib*/*.o
find external/source/meterpreter/source/bionic/ -name '*.a' -print0 | xargs -0 rm -f 2>/dev/null find external/source/meterpreter/source/bionic/ -name '*.a' -print0 | xargs -0 rm -f 2>/dev/null
find external/source/meterpreter/source/bionic/ -name '*.so' -print0 | xargs -0 rm -f 2>/dev/null
rm -f external/source/meterpreter/source/bionic/lib*/*.so rm -f external/source/meterpreter/source/bionic/lib*/*.so
rm -rf external/source/meterpreter/source/openssl/lib/linux/i386/
rm -rf posix-meterp-build-tmp
clean-pcap: clean-pcap:
#(cd posix-meterp-build-tmp/libpcap-1.1.1/ && make clean) #(cd tmp/libpcap-1.1.1/ && make clean)
# This avoids the pcap target trying to patch the same file more than once. # This avoids the pcap target trying to patch the same file more than once.
# It's a pretty small tar, so untar'ing goes pretty quickly anyway, in # It's a pretty small tar, so untar'ing goes pretty quickly anyway, in
# contrast to openssl. # contrast to openssl.
rm -r posix-meterp-build-tmp/libpcap-1.1.1 || true rm -r tmp/libpcap-1.1.1 || true
clean-ssl: clean-ssl:
(cd posix-meterp-build-tmp/openssl-0.9.8o/ && make clean) (cd tmp/openssl-0.9.8o/ && make clean)
really-clean: clean clean-ssl clean-pcap depclean really-clean: clean clean-ssl clean-pcap depclean