From bf0468de84b4ff8f915f306330a1dd96a8b213e8 Mon Sep 17 00:00:00 2001 From: Ajin Abraham Date: Mon, 28 Oct 2024 03:04:53 -0700 Subject: [PATCH] update docs --- develop.md | 8 +++---- es/extras.md | 53 +++++++++++---------------------------------- extras.md | 54 +++++++++++----------------------------------- ja-jp/extras.md | 55 +++++++++++------------------------------------ zh-cn/extras.md | 57 ++++++++++++------------------------------------- 5 files changed, 56 insertions(+), 171 deletions(-) diff --git a/develop.md b/develop.md index 3ff9627..e16edb9 100644 --- a/develop.md +++ b/develop.md @@ -10,7 +10,7 @@ Operating Systems: Mac, Linux, Windows * Install [Git](https://www.atlassian.com/git/tutorials/install-git) * Install [Python **3.10+**](https://www.python.org/) * After installing Python 3.10+, go to `/Applications/Python 3.10/` and run `Update Shell Profile.command` first and then `Install Certificates.command` - * Install [JDK 8+](https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html) + * Install [OpenJDK 21+](https://jdk.java.net/) * Install command line tools `xcode-select --install` and then `sudo xcode-select --switch /Applications/Xcode.app` * Download & Install [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html) as per the [wiki instructions](https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf) * Windows App Static analysis requires a Windows Host or Windows VM for Mac and Linux. [More Info](https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/master/mobsf/install/windows/readme.md) @@ -19,7 +19,7 @@ Operating Systems: Mac, Linux, Windows * **Ubuntu/Debian based Linux**: * Install Git `sudo apt-get install git` * Install Python **3.10+** `sudo apt-get install python3.10` - * Install JDK 8+ `sudo apt-get install openjdk-8-jdk` + * Install OpenJDK 21+ `sudo apt install openjdk-21-jdk` * Install the following dependencies ```bash sudo apt install python3-dev python3-venv python3-pip build-essential libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev wkhtmltopdf @@ -29,7 +29,7 @@ Operating Systems: Mac, Linux, Windows * **Windows** * Install [Git](https://git-scm.com/download/win) * Install [Python **3.10+**](https://www.python.org/) - * Install [JDK 8+](https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html) + * Install [OpenJDK 21+](https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html) * Install [Microsoft Visual C++ Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16) * Install [OpenSSL (non-light)](https://slproweb.com/products/Win32OpenSSL.html) * Download & Install [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html) as per the [wiki instructions](https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf) @@ -42,7 +42,7 @@ Operating Systems: Mac, Linux, Windows # Installation -**Tested on Windows 10, Ubuntu (18.04, 19.04) , macOS Catalina** +**Tested on Windows 10, Ubuntu 22.04 , macOS 14.3 (M3)** !> Please make sure that all the requirements mentioned are installed first. diff --git a/es/extras.md b/es/extras.md index 48c0b03..48e1488 100644 --- a/es/extras.md +++ b/es/extras.md @@ -68,50 +68,23 @@ MobSF usa la API de AppMonsta para obtener los detalles de la Google Play Store *** ## Usar PostgreSQL en lugar de SQLite -Por defecto, MobSF usa SQLite. Se puede cambiar el backend a PostgreSQL si se requiere. +De forma predeterminada, MobSF usa SQLite como base de datos. Sin embargo, puede cambiar a un backend de PostgreSQL si es necesario. -**Instalar psycopg2** +Para configurar PostgreSQL, configure las siguientes variables de entorno antes de iniciar MobSF: -```bash -pip install psycopg2-binary -``` - -**Modificar la Configuración** - -Navegar a `mobsf/MobSF/settings.py` y comentar lo siguiente: - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': DB_DIR, - } -} -``` - -Seguidamente, deberá de descomentar el siguiente bloque de código: - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'mobsf', - 'USER': 'postgres', - 'PASSWORD': '', - 'HOST': 'localhost', - 'PORT': '', - } -} -``` - -Después se deberá de crear una base de datos en PosgreSQL llamada `mobsf` y configurarla con las opciónes correctas que aparecen en el bloque de código anterior. + POSTGRES_USER=postgres + POSTGRES_PASSWORD=password + POSTGRES_DB=mobsf + POSTGRES_HOST=postgres + POSTGRES_PORT=5432 -**Aplicar las Migraciones** +**Aplicar migraciones** ```bash -python manage.py makemigrations -python manage.py makemigrations StaticAnalyzer -python manage.py migrate +poetry run python manage.py makemigrations +poetry run python manage.py makemigrations StaticAnalyzer +poetry run python manage.py migrate +poetry run python manage.py create_roles ``` -Finalmente, es necesario reiniciar el servidor de MobSF, con lo cual se habrá configurado Postgres como tu nueva base de datos de manera exitosa. +Ahora puede reiniciar el servidor MobSF y PostgreSQL se configurará correctamente como base de datos. \ No newline at end of file diff --git a/extras.md b/extras.md index dcef3df..5564e46 100644 --- a/extras.md +++ b/extras.md @@ -71,53 +71,23 @@ We use AppMonsta API to fetch details from Google Play Store as a fail safe to o *** ## Using Postgres DB instead of SQLite -MobSF by default uses SQLite. You can change the backend to Postgres if required. +By default, MobSF uses SQLite as its database. However, you can switch to a PostgreSQL backend if needed. -**Install psycopg2 dependency** +To configure PostgreSQL, set the following environment variables before starting MobSF: -```bash -pip install psycopg2-binary -``` - -**Modify Configuration** - -Go to `mobsf/MobSF/settings.py` - -Comment the following - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': DB_DIR, - } -} -``` - -Now uncomment the following - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'mobsf', - 'USER': 'postgres', - 'PASSWORD': '', - 'HOST': 'localhost', - 'PORT': '', - } -} -``` - -Create a database in Postgres named `mobsf` and configure the above settings with correct username, password and other details. + POSTGRES_USER=postgres + POSTGRES_PASSWORD=password + POSTGRES_DB=mobsf + POSTGRES_HOST=postgres + POSTGRES_PORT=5432 **Apply Migrations** ```bash -python manage.py makemigrations -python manage.py makemigrations StaticAnalyzer -python manage.py migrate -python manage.py create_roles +poetry run python manage.py makemigrations +poetry run python manage.py makemigrations StaticAnalyzer +poetry run python manage.py migrate +poetry run python manage.py create_roles ``` -Now you can restart MobSF server and you have successfully configured Postgres as your database. +You can now restart the MobSF server, and PostgreSQL will be successfully configured as the database. diff --git a/ja-jp/extras.md b/ja-jp/extras.md index 1af57bb..953968e 100644 --- a/ja-jp/extras.md +++ b/ja-jp/extras.md @@ -69,52 +69,23 @@ MobSFではもともとの実装のフェイルセーフとして、AppMonsta AP *** ## SQLiteの代わりにPostgres DBを用いる -MobSFはデフォルトではSQLiteを用いています。必要ならバックエンドをPostgresに変更できます。 +デフォルトでは、MobSF はデータベースとして SQLite を使用します。ただし、必要に応じて PostgreSQL バックエンドに切り替えることができます。 -**依存する psycopg2 のインストール** +PostgreSQL を構成するには、MobSF を開始する前に次の環境変数を設定します。 -```bash -pip install psycopg2-binary -``` - -**設定の変更** - -`mobsf/MobSF/settings.py`を開く - -以下をコメントアウト - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': DB_DIR, - } -} -``` - -以下のコメントを解除 - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'mobsf', - 'USER': 'postgres', - 'PASSWORD': '', - 'HOST': 'localhost', - 'PORT': '', - } -} -``` - -Postgres に名称`mobsf` のデータベースを作り、上の設定を正しいユーザー名、パスワード、その他詳細な情報に直します。 + POSTGRES_USER=postgres + POSTGRES_PASSWORD=password + POSTGRES_DB=mobsf + POSTGRES_HOST=postgres + POSTGRES_PORT=5432 -**マイグレーションの適用** +**移行の適用** ```bash -python manage.py makemigrations -python manage.py makemigrations StaticAnalyzer -python manage.py migrate +poetry run python manage.py makemigrations +poetry run python manage.py makemigrations StaticAnalyzer +poetry run python manage.py migrate +poetry run python manage.py create_roles ``` -これでMobSFサーバーを再起動することで、Postgresをデータベースとして正しく設定できました。 +これで MobSF サーバーを再起動できるようになり、PostgreSQL がデータベースとして正常に構成されます。 \ No newline at end of file diff --git a/zh-cn/extras.md b/zh-cn/extras.md index e9bfffa..3268093 100644 --- a/zh-cn/extras.md +++ b/zh-cn/extras.md @@ -69,52 +69,23 @@ python mass_static_analysis.py -s 127.0.0.1:8000 -k -d /home/fil *** ## 使用Postgres DB代替SQLite -MobSF默认使用SQLite。如果需要,可以将后端更改为Postgres。 +默认情况下,MobSF 使用 SQLite 作为其数据库。但是,如果需要,您可以切换到 PostgreSQL 后端。 -**安装psycopg2依赖项** +要配置 PostgreSQL,请在启动 MobSF 之前设置以下环境变量: -```bash -pip install psycopg2-binary -``` - -**修改配置n** - -转到 `mobsf/MobSF/settings.py` - -注释以下内容 - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': DB_DIR, - } -} -``` - -现在取消注释以下内容 - -```python -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'mobsf', - 'USER': 'postgres', - 'PASSWORD': '', - 'HOST': 'localhost', - 'PORT': '', - } -} -``` - -在Postgres中创建一个名为`mobsf`的数据库,并使用正确的用户名,密码和其他详细信息配置上述设置。 + POSTGRES_USER=postgres + POSTGRES_PASSWORD=password + POSTGRES_DB=mobsf + POSTGRES_HOST=postgres + POSTGRES_PORT=5432 **应用迁移** -```bash -python manage.py makemigrations -python manage.py makemigrations StaticAnalyzer -python manage.py migrate -``` +````bash +poetry run python manage.py makemigrations +poetry run python manage.py makemigrations StaticAnalyzer +poetry run python manage.py migrate +poetry run python manage.py create_roles +```` -现在您可以重新启动MobSF服务器,并且已成功将Postgres配置为数据库。 +您现在可以重新启动 MobSF 服务器,并且 PostgreSQL 将成功配置为数据库。 \ No newline at end of file