Reputation: 149
I would like to write a python script to test passwords for a 7zip file, is there a function that allow to write in the password field of the 7zip file ?
Thanks
Upvotes: 0
Views: 1111
Reputation: 307
I don't know if there is a particular function that might help you but what I usually do is that just run terminal commands from python (I use a Linux system).
import os
import subprocess
subprocess.call (["7z", "x", "test.7z", "-ppasswd"])
In the above example test is the name of your file and passwd is the password that you need for decompression.
Upvotes: 1