Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"OSError: [Errno 22] Invalid argument: " Dynamic Analysis - Windows 10 - MobSF v.2.0 #1086

Closed
ghub101 opened this issue Sep 22, 2019 · 2 comments
Labels
enhancement MobSF enhancements and feature requests

Comments

@ghub101
Copy link

ghub101 commented Sep 22, 2019

ENVIRONMENT

OS and Version: Windows 10
Python Version: 3.7.4
MobSF Version: 2.0

EXPLANATION OF THE ISSUE

What happens, under which versions, under what conditions, when, and what were you expecting instead.
When executing "run.bat" and OSError occurs.

 It appears to related the "com.crashlytics.sdk.android:answers:settings.xml" which contains colons which is causing an error in Windows 10

STEPS TO REPRODUCE THE ISSUE

start MobSF with "run.bat"

LOG FILE

[INFO] 22/Sep/2019 16:04:30 - Getting app files
[ERROR] 22/Sep/2019 16:04:30 - Tar extraction failed
Traceback (most recent call last):
  File "C:\Users\Gilbert.Hazel\Documents\GitHub\Mobile-Security-Framework-MobSF\DynamicAnalyzer\views\android\analysis.py", line 174, in get_app_files
    tar.extractall(untar_dir)
  File "C:\Users\Gilbert.Hazel\Anaconda3\lib\tarfile.py", line 2002, in extractall
    numeric_owner=numeric_owner)
  File "C:\Users\Gilbert.Hazel\Anaconda3\lib\tarfile.py", line 2044, in extract
    numeric_owner=numeric_owner)
  File "C:\Users\Gilbert.Hazel\Anaconda3\lib\tarfile.py", line 2114, in _extract_member
    self.makefile(tarinfo, targetpath)
  File "C:\Users\Gilbert.Hazel\Anaconda3\lib\tarfile.py", line 2155, in makefile
    with bltn_open(targetpath, "wb") as target:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\testuser\\Documents\\GitHub\\Mobile-Security-Framework-MobSF\\uploads\\28f3efeb40baaecf8f88cd21993ec250\\DYNAMIC_DeviceData\\data\\data\\com.sainsburys.gol\\shared_prefs\\com.crashlytics.sdk.android:answers:settings.xml'
[INFO] 22/Sep/2019 16:04:30 - Generating Download
@ajinabraham ajinabraham added the enhancement MobSF enhancements and feature requests label Sep 23, 2019
@ajinabraham
Copy link
Member

This looks like a windows problem as colons in filenames are reserved characters in Windows. We don't like the idea of renaming the actual file for the sake of supporting in Windows. We will look into alternatives and track this as an enhancement separately.

@ajinabraham
Copy link
Member

Should be handled by the new pathlib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement MobSF enhancements and feature requests
Projects
None yet
Development

No branches or pull requests

2 participants