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

Update static_analysis.py #98

Open
wants to merge 3 commits into
base: v1
Choose a base branch
from

Conversation

DMyachin
Copy link

Fix for false detection for path '/dir/dir/classes.dex.dat'

Last version of ru.gibdd_pay.app has file assets/classes.dex.dat:

dexdump E 08-14 12:24:43     7     7 dexdump.cc:1884] Expected valid zip or dex file
Traceback (most recent call last):
  File "/exodus_analyze.py", line 134, in <module>
    main()
  File "/exodus_analyze.py", line 130, in main
    analyze_apk(args.apk, args.json_mode, args.output_file, args.override_code, ignore_list)
  File "/exodus_analyze.py", line 73, in analyze_apk
    analysis.print_embedded_trackers()
  File "/usr/local/lib/python3.11/site-packages/exodus_core/analysis/static_analysis.py", line 509, in print_embedded_trackers
    trackers = self.detect_trackers()
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/exodus_core/analysis/static_analysis.py", line 246, in detect_trackers
    return self.detect_trackers_in_list(self.get_embedded_classes())
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/exodus_core/analysis/static_analysis.py", line 207, in get_embedded_classes
    self.classes = list(self._get_embedded_classes(self.apk_path))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/exodus_core/analysis/static_analysis.py", line 193, in _get_embedded_classes
    run = subprocess.check_output(['dexdump', f'{tmp_dir}/{info.filename}'])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dexdump', '/tmp/tmpywy4incv/assets/classes.dex.dat']' returned non-zero exit status 1.

@codeurimpulsif codeurimpulsif requested a review from pnu-s February 15, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant