Search code examples
pythonunzip

Unzip prompted "Press 'Q' to quit, or any other key to continue"


I want to write a Python script to automatically unzip lots of apk files and then do static analysis. However, when I unzip some apk files, unzip prompted that "Press 'Q' to quit, or any other key to continue".

Because it's a script and I haven't press any key then the script hangs. Any command option can solve this problem? Or do I have to handle it in Python? Thanks in advance :D


Solution

  • You don't say what the structure looks like, but for a single use of unzip you can try this:

    echo Q | unzip myfile.zip