-
Notifications
You must be signed in to change notification settings - Fork 10
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
Archives with passwords cause an infinite hang while waiting for input #5
Comments
I think this is closed via #6, reopen if necessary! |
Would you consider adding an option to skip password archives during extraction? |
Definitely! feel free to open a PR with that change. |
Can you either provide the full archive file that contained the password archive, or provide a recipe for reproducing the full archive? Having it just hang is definitely a bug, and I'd like to fix it. Assuming this happened with version 8.1.0 or above. As far as skipping passworded archives - we have a --noninteractive option. I wonder if that's the best way to skip password archives, rather than adding another argument? |
"Now it works for that case. Thank you!" -> as in, your MR fixed this bug and thank you for doing this for all of us! Most of my issues I had by using old version which were delivered with Kali repository for example and then trying to pip3 install over it etc. I like your idea for --noninteractive . Currently this makes it not non-interactive. I believe a Warning output would be enough so that people are notified that it was skipped. |
A number of archive types support encryption with a password: zip, rar, 7z.. When dtrx encounters one of these, it just hangs waiting for the user to put in a password. However, it doesn't ask for a password, nor does it echo the password prompt from the underlying command. Instead, it just sits there silently waiting.
The reason for this is because dtrx sets stdout to /dev/null, and saves stderr to a temporary file. So the user never sees the password prompt. Zip and rar output their prompts to stderr, and 7z outputs it prompt to stdout.
In addition, errors to stderr seem to be thrown away, or shown AFTER we're asked where to output (invalid) files
For example:
dilinger@e7470:
$ echo foo > test2; zip -P foobar file.zip test2$ dtrx file.zipupdating: test2 (stored 0%)
dilinger@e7470:
file.zip contains one file but its name doesn't match.
Expected: file
Actual: test2
You can:
What do you want to do? (I/r/h) i
dtrx: WARNING: extracting /home/dilinger/file.zip to ./file.rl629f5n
dtrx: WARNING: Error output from this process:
ERROR: Wrong password : test2
The text was updated successfully, but these errors were encountered: