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.51k stars 3.24k forks source link

Strange issue on Capture Strings cause apps to crash #1825

Closed mastercho closed 3 years ago

mastercho commented 3 years ago

ENVIRONMENT

OS and Version: Windows 10 Pro- version 20H2
Python Version:  3.8.5
MobSF Version: 3.4.3 

EXPLANATION OF THE ISSUE

I did encounter this issue on some apps, not in all but some throws that error and can't find anything about it. Its probably frida issue but maybe someone else had this issue before. It causes apps to crash.

STEPS TO REPRODUCE THE ISSUE

1. Go Dynamic analysis on  com.flowers1800.androidapp2 package
2. Check "Capture Strings" option 
3. start Dynamic analysis

LOG FILE

Traceback (most recent call last):
  File "C:\Users\Mastercho\Desktop\Mobile-Security-Framework-MobSF-3.4.3\venv\lib\site-packages\frida\core.py", line 383, in _on_message
    callback(message, data)
  File "C:\Users\Mastercho\Desktop\Mobile-Security-Framework-MobSF-3.4.3\mobsf\DynamicAnalyzer\views\android\frida_core.py", line 103, in frida_response
    self.write_log(self.frida_log,
  File "C:\Users\Mastercho\Desktop\Mobile-Security-Framework-MobSF-3.4.3\mobsf\DynamicAnalyzer\views\android\frida_core.py", line 159, in write_log
    flip.write(data)
  File "C:\Program Files (x86)\Python38-32\lib\encodings\cp1251.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u221e' in position 25: character maps to <undefined>
github-actions[bot] commented 3 years ago

👋 @mastercho Issues is only for reporting a bug/feature request. For limited support, questions, and discussions, please join MobSF Slack channel Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.

ajinabraham commented 3 years ago

This is probably a charset issue in Windows. You need to ensure that the locale is set to utf-8 https://superuser.com/questions/1033088/is-it-possible-to-set-locale-of-a-windows-application-to-utf-8/1451686#1451686

mastercho commented 3 years ago

This is probably a charset issue in Windows. You need to ensure that the locale is set to utf-8 https://superuser.com/questions/1033088/is-it-possible-to-set-locale-of-a-windows-application-to-utf-8/1451686#1451686

That fixed the issue thanks!