Skip to content

Commit

Permalink
Merge pull request #27 from MobSF/v4.1
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
ajinabraham authored Oct 28, 2024
2 parents 1d0551d + bf0468d commit dd8b2be
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 171 deletions.
8 changes: 4 additions & 4 deletions develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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.

Expand Down
53 changes: 13 additions & 40 deletions es/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
54 changes: 12 additions & 42 deletions extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
55 changes: 13 additions & 42 deletions ja-jp/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 がデータベースとして正常に構成されます
57 changes: 14 additions & 43 deletions zh-cn/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,52 +69,23 @@ python mass_static_analysis.py -s 127.0.0.1:8000 -k <rest_api_key> -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 将成功配置为数据库

0 comments on commit dd8b2be

Please sign in to comment.