aurel_lab
aurel_lab

Reputation: 149

how to test for passwords entries of a 7zip file using a python script?

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

Answers (1)

Jay T.
Jay T.

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

Related Questions