mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-12 02:06:59 +00:00
* Docker base image update * Docker file QA * Github Actions version update * Removed unwanted pinned repository * Pip to Poetry migration * Bump httptools * Jump yara-python-dex * Python 3.11 support
39 lines
1.2 KiB
Bash
Executable File
39 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# For apktool
|
|
mkdir -p /home/mobsf/.local/share/apktool/framework
|
|
|
|
# Install yara-python dex on linux/arm64
|
|
if [ "$TARGETPLATFORM" == "linux/arm64" ]
|
|
then
|
|
WKH_FILE=$WKH_FILE_ARM
|
|
JDK_FILE=$JDK_FILE_ARM
|
|
apt install -y git
|
|
pip3 install --no-cache-dir wheel
|
|
pip3 wheel --wheel-dir=yara-python-dex git+https://github.com/MobSF/yara-python-dex.git
|
|
pip3 install --no-cache-dir --no-index --find-links=yara-python-dex yara-python-dex
|
|
rm -rf yara-python-dex
|
|
fi
|
|
|
|
echo "Target platform identified as $TARGETPLATFORM"
|
|
|
|
JDK_URL="https://download.java.net/java/GA/jdk20.0.2/6e380f22cbe7469fa75fb448bd903d8e/9/GPL/${JDK_FILE}"
|
|
WKH_URL="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/${WKH_FILE}"
|
|
|
|
# Download and install wkhtmltopdf
|
|
echo "Installing $WKH_FILE ..."
|
|
wget --quiet -O /tmp/${WKH_FILE} "${WKH_URL}" && \
|
|
dpkg -i /tmp/${WKH_FILE} && \
|
|
apt-get install -f -y --no-install-recommends && \
|
|
ln -s /usr/local/bin/wkhtmltopdf /usr/bin && \
|
|
rm -f /tmp/${WKH_FILE}
|
|
|
|
# Install OpenJDK
|
|
echo "Installing $JDK_FILE ..."
|
|
wget --quiet "${JDK_URL}" && \
|
|
tar zxf "${JDK_FILE}" && \
|
|
rm -f "${JDK_FILE}"
|
|
|
|
# Delete script
|
|
rm $0
|