mirror of https://github.com/n1nj4sec/pupy.git
Fix builds. Add more packages to buildenv
This commit is contained in:
parent
ac73116fa3
commit
128ec9bc53
|
@ -4,8 +4,8 @@
|
||||||
make -f Makefile ARCH=win32 clean
|
make -f Makefile ARCH=win32 clean
|
||||||
make -f Makefile ARCH=win32
|
make -f Makefile ARCH=win32
|
||||||
make -f Makefile DEBUG=1 ARCH=win32 clean
|
make -f Makefile DEBUG=1 ARCH=win32 clean
|
||||||
make -f Makefile ARCH=win32
|
make -f Makefile DEBUG=1 ARCH=win32
|
||||||
make -f Makefile ARCH=win64 clean
|
make -f Makefile ARCH=win64 clean
|
||||||
make -f Makefile ARCH=win64
|
make -f Makefile ARCH=win64
|
||||||
make -f Makefile DEBUG=1 ARCH=win64 clean
|
make -f Makefile DEBUG=1 ARCH=win64 clean
|
||||||
make -f Makefile ARCH=win64
|
make -f Makefile DEBUG=1 ARCH=win64
|
||||||
|
|
|
@ -13,8 +13,11 @@ PYTHON32="https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi"
|
||||||
PYTHONVC="https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi"
|
PYTHONVC="https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi"
|
||||||
# PYCRYPTO32="http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe"
|
# PYCRYPTO32="http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe"
|
||||||
# PYCRYPTO64="http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win-amd64-py2.7.exe"
|
# PYCRYPTO64="http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win-amd64-py2.7.exe"
|
||||||
|
# PYWIN32="http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20220/pywin32-220.win32-py2.7.exe"
|
||||||
|
# PYWIN64="http://downloads.sourceforge.net/project/pywin32/pywin32/Build%20220/pywin32-220.win-amd64-py2.7.exe"
|
||||||
|
|
||||||
PACKAGES="rpyc pyaml rsa pefile image rsa netaddr pypiwin32 win_inet_pton netaddr tinyec uptime pycrypto"
|
PACKAGES="rpyc pyaml rsa pefile image rsa netaddr win_inet_pton netaddr tinyec uptime pycrypto cryptography pypiwin32"
|
||||||
|
PACKAGES="$PACKAGES asyncoro mss"
|
||||||
|
|
||||||
BUILDENV=${1:-`pwd`/buildenv}
|
BUILDENV=${1:-`pwd`/buildenv}
|
||||||
|
|
||||||
|
@ -23,6 +26,8 @@ if [ -f $BUILDENV/.ready ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exec < /dev/null
|
||||||
|
|
||||||
WINE=${WINE:-wine}
|
WINE=${WINE:-wine}
|
||||||
WINE32="$BUILDENV/win32"
|
WINE32="$BUILDENV/win32"
|
||||||
WINE64="$BUILDENV/win64"
|
WINE64="$BUILDENV/win64"
|
||||||
|
@ -54,21 +59,21 @@ for prefix in $WINE32 $WINE64; do
|
||||||
ln -s $SOURCES $prefix/dosdevices/x:
|
ln -s $SOURCES $prefix/dosdevices/x:
|
||||||
done
|
done
|
||||||
|
|
||||||
WINEPREFIX=$WINE32 wineserver -k
|
WINEPREFIX=$WINE32 wineserver -k || true
|
||||||
|
|
||||||
[ ! -f $WINE32/drive_c/.python ] && \
|
[ ! -f $WINE32/drive_c/.python ] && \
|
||||||
WINEPREFIX=$WINE32 msiexec /i Y:\\python-2.7.13.msi /q && \
|
WINEPREFIX=$WINE32 msiexec /i Y:\\python-2.7.13.msi /q && \
|
||||||
touch $WINE32/drive_c/.python
|
touch $WINE32/drive_c/.python
|
||||||
|
|
||||||
WINEPREFIX=$WINE32 wineboot -r
|
WINEPREFIX=$WINE32 wineboot -r
|
||||||
WINEPREFIX=$WINE32 wineserver -k
|
WINEPREFIX=$WINE32 wineserver -k || true
|
||||||
|
|
||||||
[ ! -f $WINE64/drive_c/.python ] && \
|
[ ! -f $WINE64/drive_c/.python ] && \
|
||||||
WINEPREFIX=$WINE64 msiexec /i Y:\\python-2.7.13.amd64.msi /q && \
|
WINEPREFIX=$WINE64 msiexec /i Y:\\python-2.7.13.amd64.msi /q && \
|
||||||
touch $WINE64/drive_c/.python
|
touch $WINE64/drive_c/.python
|
||||||
|
|
||||||
WINEPREFIX=$WINE64 wineboot -r
|
WINEPREFIX=$WINE64 wineboot -r
|
||||||
WINEPREFIX=$WINE64 wineserver -k
|
WINEPREFIX=$WINE64 wineserver -k || true
|
||||||
|
|
||||||
for prefix in $WINE32 $WINE64; do
|
for prefix in $WINE32 $WINE64; do
|
||||||
[ ! -f $prefix/drive_c/.vc ] && \
|
[ ! -f $prefix/drive_c/.vc ] && \
|
||||||
|
@ -87,10 +92,11 @@ for prefix in $WINE32 $WINE64; do
|
||||||
WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade setuptools
|
WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade setuptools
|
||||||
WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade $PACKAGES
|
WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade $PACKAGES
|
||||||
WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade --no-binary :all: psutil
|
WINEPREFIX=$prefix wine C:\\Python27\\python -O -m pip install --upgrade --no-binary :all: psutil
|
||||||
|
WINEPREFIX=$prefix wine C:\\Python27\\python -O -m compileall C:\\Python27\\Lib || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# WINEPREFIX=$WINE32 wine C:\\Python27\\python.exe -m easy_install -Z $PYCRYPTO32
|
# WINEPREFIX=$WINE32 wine C:\\Python27\\python.exe -m easy_install -Z $PYWIN32
|
||||||
# WINEPREFIX=$WINE64 wine C:\\Python27\\python.exe -m easy_install -Z $PYCRYPTO64
|
# WINEPREFIX=$WINE64 wine C:\\Python27\\python.exe -m easy_install -Z $PYWIN64
|
||||||
|
|
||||||
cat >$WINE32/python.sh <<EOF
|
cat >$WINE32/python.sh <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
@ -138,18 +144,31 @@ echo "[+] Creating bundles"
|
||||||
|
|
||||||
TEMPLATES=`readlink -f ../../pupy/payload_templates`
|
TEMPLATES=`readlink -f ../../pupy/payload_templates`
|
||||||
|
|
||||||
cd buildenv/win32/drive_c/Python27/Lib
|
OPWD=`pwd`
|
||||||
zip -y \
|
|
||||||
-x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" -x "*.pyo" \
|
|
||||||
-x "*test/*" -x "*tests/*" -x "*examples/*" \
|
|
||||||
-r9 ${TEMPLATES}/windows-x86.zip . ../libs
|
|
||||||
cd -
|
|
||||||
|
|
||||||
cd buildenv/win64/drive_c/Python27/Lib
|
cd $OPWD/buildenv/win32/drive_c/Python27
|
||||||
zip -y \
|
rm -f ${TEMPLATES}/windows-x86.zip
|
||||||
-x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" -x "*.pyo" \
|
for dir in Lib DLLs; do
|
||||||
-x "*test/*" -x "*tests/*" -x "*examples/*" \
|
cd $dir
|
||||||
-r9 ${TEMPLATES}/windows-amd64.zip . ../libs
|
zip -y \
|
||||||
cd -
|
-x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" \
|
||||||
|
-x "*test/*" -x "*tests/*" -x "*examples/*" \
|
||||||
|
-r9 ${TEMPLATES}/windows-x86.zip .
|
||||||
|
cd -
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $OPWD/buildenv/win64/drive_c/Python27
|
||||||
|
rm -f ${TEMPLATES}/windows-amd64.zip
|
||||||
|
|
||||||
|
for dir in Lib DLLs; do
|
||||||
|
cd $dir
|
||||||
|
zip -y \
|
||||||
|
-x "*.a" -x "*.o" -x "*.whl" -x "*.txt" -x "*.py" \
|
||||||
|
-x "*test/*" -x "*tests/*" -x "*examples/*" \
|
||||||
|
-r9 ${TEMPLATES}/windows-amd64.zip .
|
||||||
|
cd -
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $OPWD/
|
||||||
|
|
||||||
touch $BUILDENV/.ready
|
touch $BUILDENV/.ready
|
||||||
|
|
Loading…
Reference in New Issue