MobSF / Mobile-Security-Framework-MobSF

Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
https://opensecurity.in
GNU General Public License v3.0
17.25k stars 3.22k forks source link

[Errno 5] Input/output error #1574

Closed gbozzetti closed 3 years ago

gbozzetti commented 3 years ago

ENVIRONMENT

Django Version: 3.1.2 Python Version: 3.7.5 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'StaticAnalyzer', 'DynamicAnalyzer', 'MobSF', 'MalwareAnalyzer') Installed Middleware: ('MobSF.views.api.rest_api_middleware.RestApiAuthMiddleware',)

EXPLANATION OF THE ISSUE

Hello,

I've installed this amazing tool and I'm testing it with different apps, it works really nice but sometimes the application crashes with the error:

OSError at / [Errno 5] Input/output error

Thus I have to kill the gunicorn process and restart the application.

Can you please help to resolve the issue?

Thank you very much in advance

LOG FILE

Exception Type: | OSError Exception Value: | [Errno 5] Input/output error Exception Location: | /root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/colorama/ansitowin32.py, line 196, in write_plain_text Python Executable: | /root/Mobile-Security-Framework-MobSF/venv/bin/python3 Python Path: | ['/root/Mobile-Security-Framework-MobSF', '/root/Mobile-Security-Framework-MobSF/venv/bin', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages']

Traceback (most recent call last): File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 165, in _get_response callback, callback_args, callback_kwargs = self.resolve_request(request) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 288, in resolve_request resolver_match = resolver.resolve(request.path_info) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 545, in resolve for pattern in self.url_patterns: File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 589, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 582, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import

File "", line 983, in _find_and_load

File "", line 967, in _find_and_load_unlocked

File "", line 677, in _load_unlocked

File "", line 728, in exec_module

File "", line 219, in _call_with_frames_removed

File "/root/Mobile-Security-Framework-MobSF/MobSF/urls.py", line 114, in utils.print_version() File "/root/Mobile-Security-Framework-MobSF/MobSF/utils.py", line 90, in print_version print('REST API Key: ' + Color.BOLD + api_key() + Color.END) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/colorama/ansitowin32.py", line 41, in write self.__convertor.write(text) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/colorama/ansitowin32.py", line 162, in write self.write_and_convert(text) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/colorama/ansitowin32.py", line 187, in write_and_convert self.write_plain_text(text, cursor, start) File "/root/Mobile-Security-Framework-MobSF/venv/lib/python3.7/site-packages/colorama/ansitowin32.py", line 196, in write_plain_text self.wrapped.flush()

Exception Type: OSError at / Exception Value: [Errno 5] Input/output error

gbozzetti commented 3 years ago

My bad!

I was launching the app without the "nohup" in console, thus when the session was automatically closed it stopped the server (of course!)