Skip to content

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

Open
@strazzere

Description

@strazzere
[*] /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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions