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

apkpure sometimes downloads .apk files and saves them as .xapk #1943

Closed
domwhewell-sage opened this issue Nov 9, 2024 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@domwhewell-sage
Copy link
Contributor

domwhewell-sage commented Nov 9, 2024

Describe the bug
When running

bbot -t ......... -m google_playstore, apkpure, jadx

BBOT raised 4 MOBILE_APP events (and downloaded them) but jadx only de-compiled 3.

Looking at the debug log you get this

2024-11-09 13:18:29,416 [DEBUG] bbot.modules.jadx base.py:1380 Not accepting FILESYSTEM("{'path': '/home/user/.bbot/scans/effeminate_cthulu/apk_files/.............../com...", module=apkpure, tags={'file'}) because it did not meet custom filter criteria: Jadx is not able to decompile this file type

Running the helper on the file you get this

>>> from bbot.core.helpers.libmagic import get_magic_info
>>> get_magic_info("/home/user/.bbot/scans/effeminate_cthulu/apk_files/........................./.........................xapk")
('.docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'MS Office Open XML Format Document', 0.4)

Downloading the file manually the Content-Disposition header is attachment; filename=".................._3.2_APKPure.apk"

So the file is an .apk file but the apkpure module has named it with a .xapk extension causing the helper to not detect the type correctly. (This is the same thats happening in the TestCase mentioned in #1932)

The apkpure module needs modifying so the file extension is not hardcoded and we rather use the Content-Disposition instead (The extension at least the filename has added crap)

@domwhewell-sage domwhewell-sage added the bug Something isn't working label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant