mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-12 02:06:59 +00:00
Code QA (#990)
* removed unused variable * remove useless import * Added missing variables
This commit is contained in:
committed by
Ajin Abraham
parent
1238b265df
commit
d81abcaabe
@@ -2,7 +2,6 @@
|
||||
import os
|
||||
import logging
|
||||
from django.conf import settings
|
||||
from MobSF.utils import filename_from_path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -49,4 +48,4 @@ def apkid_analysis(app_dir, apk_file, apk_name):
|
||||
for item in findings:
|
||||
filename = item['filename']
|
||||
sanitized[filename] = item['matches']
|
||||
return sanitized
|
||||
return sanitized
|
||||
|
||||
@@ -15,9 +15,12 @@
|
||||
import zipfile
|
||||
import os
|
||||
import subprocess
|
||||
import logging
|
||||
from .main import read, translate, writeToJar
|
||||
from .jvm.optimization import options
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def getStubs():
|
||||
with zipfile.ZipFile('tests/stubs/stubs.zip', 'r') as stubs:
|
||||
|
||||
@@ -12,7 +12,8 @@ from django.conf import settings
|
||||
from django.utils.html import escape
|
||||
|
||||
from MobSF.utils import (
|
||||
PrintException
|
||||
PrintException,
|
||||
print_n_send_error_response
|
||||
)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ from django.conf import settings
|
||||
from django.utils.html import escape
|
||||
|
||||
from MobSF.utils import (
|
||||
PrintException
|
||||
PrintException,
|
||||
print_n_send_error_response
|
||||
)
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -9,7 +9,8 @@ from django.http import HttpResponseRedirect
|
||||
from django.conf import settings
|
||||
|
||||
from MobSF.utils import (
|
||||
PrintException
|
||||
PrintException,
|
||||
print_n_send_error_response
|
||||
)
|
||||
|
||||
from StaticAnalyzer.views.android.manifest_analysis import read_manifest
|
||||
|
||||
@@ -11,7 +11,8 @@ from django.conf import settings
|
||||
from django.utils.html import escape
|
||||
|
||||
from MobSF.utils import (
|
||||
PrintException
|
||||
PrintException,
|
||||
print_n_send_error_response
|
||||
)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from six.moves import input
|
||||
|
||||
try:
|
||||
import urllib.request as urlrequest
|
||||
@@ -310,12 +311,7 @@ def generate_secret():
|
||||
"\t(default: Mobile-Security-Framework-MobSF/MobSF/windows_vm_priv_key.asc)"
|
||||
.format(CONFIG['MobSF']['priv_key'])
|
||||
))
|
||||
if sys.version_info.major == 3:
|
||||
# pylint: disable-msg=W0141
|
||||
# For python3
|
||||
input("Please press any key when done..")
|
||||
elif sys.version_info.major == 2:
|
||||
raw_input("Please press any key when done..")
|
||||
input("Please press any key when done..")
|
||||
|
||||
|
||||
def autostart():
|
||||
|
||||
@@ -23,7 +23,6 @@ python3 -m pip install virtualenv
|
||||
python3 -m virtualenv venv -p python3
|
||||
source venv/bin/activate
|
||||
|
||||
platform='unknown'
|
||||
unamestr=`uname`
|
||||
if [[ "$unamestr" == 'Darwin' ]]; then
|
||||
export ARCHFLAGS="-arch x86_64"
|
||||
@@ -47,4 +46,4 @@ python manage.py makemigrations
|
||||
python manage.py makemigrations StaticAnalyzer
|
||||
python manage.py migrate
|
||||
echo 'Download and Install wkhtmltopdf for PDF Report Generation - https://wkhtmltopdf.org/downloads.html'
|
||||
echo '[INSTALL] Installation Complete'
|
||||
echo '[INSTALL] Installation Complete'
|
||||
|
||||
Reference in New Issue
Block a user