From ceb4c04cef9bf69d5f8ddae2bb853c7da3f20c3e Mon Sep 17 00:00:00 2001 From: Ajin Abraham Date: Sun, 10 Nov 2019 14:23:00 -0500 Subject: [PATCH] enable apkid --- .travis.yml | 4 +++- Dockerfile | 5 +++++ MobSF/settings.py | 4 ++-- requirements.txt | 1 + setup.bat | 7 +++++++ setup.sh | 7 +++++++ 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cf1c7393..38fb682d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,9 @@ install: - set PYTHONIOENCODING=UTF8 - pip3 install --upgrade pip || python -m pip install --upgrade pip before_script: -- pip3 install wheel tox +- pip3 install --upgrade wheel tox +- pip3 wheel --wheel-dir=yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/yara-python.git@v3.10.0 +- pip3 install --no-index --find-links=yara-python yara-python - pip3 install -r requirements.txt - python3 manage.py makemigrations || python manage.py makemigrations - python3 manage.py migrate || python manage.py migrate diff --git a/Dockerfile b/Dockerfile index c28dc4b0..6bad3086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,6 +80,11 @@ WORKDIR /root/Mobile-Security-Framework-MobSF RUN mkdir -p /root/.local/share/apktool/framework #Install Dependencies + +RUN pip3 install --upgrade wheel && \ + pip3 wheel --wheel-dir=yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/yara-python.git@v3.10.0 && \ + pip3 install --no-index --find-links=yara-python yara-python && \ + rm -rf yara-python RUN pip3 install --quiet --no-cache-dir -r requirements.txt #Cleanup diff --git a/MobSF/settings.py b/MobSF/settings.py index 3d930420..4a5299fa 100755 --- a/MobSF/settings.py +++ b/MobSF/settings.py @@ -19,7 +19,7 @@ logger = logging.getLogger(__name__) # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -MOBSF_VER = 'v2.0.5 Beta' +MOBSF_VER = 'v2.0.6 Beta' BANNER = """ __ __ _ ____ _____ ____ ___ @@ -327,7 +327,7 @@ else: # MALWARE ANALYZER SETTINGS # -------------------------- DOMAIN_MALWARE_SCAN = True - APKID_ENABLED = False + APKID_ENABLED = True # ============================================== # -----External URLS-------------------------- diff --git a/requirements.txt b/requirements.txt index 618d673c..a3fb5b05 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,6 +19,7 @@ asn1crypto==1.2.0 oscrypto==1.1.0 distro==1.4.0 # Do not update the following +apkid==2.0.3 pyparsing<2.3 # pyup: ignore click<7 # pyup: ignore http-tools==1.0.1 diff --git a/setup.bat b/setup.bat index ee1461d5..d7b5a000 100644 --- a/setup.bat +++ b/setup.bat @@ -37,6 +37,13 @@ where python >nul 2>&1 && ( set LIB=C:\Program Files\OpenSSL-Win64\lib;%LIB% set INCLUDE=C:\Program Files\OpenSSL-Win64\include;%INCLUDE% + echo [INSTALL] Installing dex enabled yara-python + pip install --upgrade wheel + rmdir /q /s yara-python + pip wheel --wheel-dir=yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/yara-python.git@v3.10.0 + pip install --no-index --find-links=yara-python yara-python + rmdir /q /s yara-python + echo [INSTALL] Installing Requirements pip install -r requirements.txt diff --git a/setup.sh b/setup.sh index cf9cbd48..e8a5760e 100755 --- a/setup.sh +++ b/setup.sh @@ -52,6 +52,13 @@ else exit 1 fi +echo '[INSTALL] Installing dex enabled yara-python' +pip install --upgrade wheel +rm -rf yara-python +pip wheel --wheel-dir=yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/yara-python.git@v3.10.0 +pip install --no-index --find-links=yara-python yara-python +rm -rf yara-python + echo '[INSTALL] Installing Requirements' pip install --no-cache-dir -r requirements.txt