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

Should not fail on bad zips (or should fail more gracefully?) #54

Open
strazzere opened this issue Oct 29, 2017 · 3 comments
Open

Should not fail on bad zips (or should fail more gracefully?) #54

strazzere opened this issue Oct 29, 2017 · 3 comments
Labels

Comments

@strazzere
Copy link
Member

[*] /Users/diff/reverse/targets/android//weird-anti-emulator/contents/assets/alipay_msp-3.5.2-1000261.apk!classes.dex
 |-> anti_vm : device ID check, subscriber ID check
 |-> compiler : dx
2017-10-29 16:53:01 ERROR    error extracting /Users/diff/reverse/targets/android//weird-anti-emulator/MeeLive.apk: File is not a zip file
Traceback (most recent call last):
  File "/Users/diff/repo/APKiD/apkid/apkid.py", line 132, in scan_apk
    zf = zipfile.ZipFile(apk_path, 'r')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 770, in __init__
    self._RealGetContents()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 811, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file

Function likely just needs to catch this exception and put out a better error than a crash...

Sha256 : eec876203f84247814adf3e325896f6cb8709b0aebb354afbcc075f2f979f7d6

@strazzere strazzere added the bug label Oct 29, 2017
@enovella
Copy link
Collaborator

Related issue #58 that could be fixed in the same go

@CalebFenton
Copy link
Member

@strazzere do you still have this file? I can't find the hash. Or maybe that's the hash of the classes.dex?

@enovella
Copy link
Collaborator

Hey @caleb. The problem with BadZipFile might be produced by the Python ZipFile version.
Can you check this? #58 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants