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

Not dealing with the 'files' folder when check-iocs #500

Open
Lynxiayel opened this issue May 26, 2024 · 1 comment
Open

Not dealing with the 'files' folder when check-iocs #500

Lynxiayel opened this issue May 26, 2024 · 1 comment
Labels
android bug Something isn't working

Comments

@Lynxiayel
Copy link

Lynxiayel commented May 26, 2024

The output result from mvt-android check-adb will generate a bunch of json files, as well as a files folder. If we then use mvt-android check-iocs over the check-adb result path, it will run into this files folder, and report IsADirectoryError, as follows:

INFO [mvt.common.cmd_check_iocs] Loading results from "files" with module Files
Traceback (most recent call last):
File "/home/xxxx/software/miniconda3/bin/mvt-android", line 8, in
sys.exit(cli())
^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/mvt/android/cli.py", line 396, in check_iocs
cmd.run()
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/mvt/common/cmd_check_iocs.py", line 65, in run
m = iocs_module.from_json(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/xxxx/software/miniconda3/lib/python3.12/site-packages/mvt/common/module.py", line 71, in from_json
with open(json_path, "r", encoding="utf-8") as handle:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: '../mvt/results/files'

@Te-k Te-k added bug Something isn't working android labels Aug 23, 2024
@Te-k
Copy link
Contributor

Te-k commented Aug 23, 2024

Hi @Lynxiayel , thanks for reporting that, this is indeed a bug in MVT. We'll add it to things to fix in the next version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants