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.
Fix the issue of unclosed files in Windows system causing unauthorized access to read yaml files.
return yaml.safe_load(file_obj.read_text('utf-8', 'ignore'))
File "C:\Python3\lib\pathlib.py", line 1266, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "C:\Python3\lib\pathlib.py", line 1252, in open
return io.open(self, mode, buffering, encoding, errors, newline,
File "C:\Python3\lib\pathlib.py", line 1120, in _opener
return self._accessor.open(self, flags, mode)
PermissionError: [Errno 13] Permission denied: 'C:\Users\test\AppData\Local\Temp\tmpclbvrcwq'
Describe the Pull Request
DESCRIBE THE DETAILS OF PULL REQUEST HERE
Checklist for PR
[ ] Run MobSF unit tests and lint tox -e lint,test
[ ] Tested Working on Linux, Mac, Windows, and Docker
[ ] Add unit test for any new Web API (Refer: StaticAnalyzer/tests.py)
Fix the issue of unclosed files in Windows system causing unauthorized access to read yaml files.
return yaml.safe_load(file_obj.read_text('utf-8', 'ignore')) File "C:\Python3\lib\pathlib.py", line 1266, in read_text with self.open(mode='r', encoding=encoding, errors=errors) as f: File "C:\Python3\lib\pathlib.py", line 1252, in open return io.open(self, mode, buffering, encoding, errors, newline, File "C:\Python3\lib\pathlib.py", line 1120, in _opener return self._accessor.open(self, flags, mode) PermissionError: [Errno 13] Permission denied: 'C:\Users\test\AppData\Local\Temp\tmpclbvrcwq'
Describe the Pull Request
Checklist for PR
tox -e lint,test
StaticAnalyzer/tests.py
)Additional Comments (if any)