Python Forum
Archive (.7z, .zip, .rar, .tar, etc) Password Extractor
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Archive (.7z, .zip, .rar, .tar, etc) Password Extractor
#1
Hi Everyone,

I'm just new to Python. I've already learned the basics by watching videos online.

I am planning to write a script that will automatically extract password protected archives such as 7z, zip, rar, tar, etc.

What I want to happened is when I do a right click on that archive (Windows Machine), there will be an option to select to call my script to extract the archive and extract it using predefined passwords. For example, the passwords that I want to use to automatically extract the archive are the following - "1234", "password", "admin".

This is the only code that I have so far.
import zipfile zf = zipfile.ZipFile('data.zip') print zf.namelist() from zipfile import ZipFile with ZipFile('data.zip') as zf: zf.extractall(pwd='password')
Thank you for your help!
Reply
#2
see package: https://pypi.org/project/password/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extract and rename a file from an Archive tester_V 4 5,875 Jul-08-2024, 07:54 AM
Last Post: tester_V
  Extracting specific file from an archive tester_V 4 6,169 Jan-29-2024, 06:41 PM
Last Post: tester_V
  Installing Pillow from remote archive in Linux Flatpak ChrisOfBristol 6 3,607 Sep-23-2022, 07:48 PM
Last Post: ChrisOfBristol
  Find specific file in an archive tester_V 8 5,863 Feb-13-2021, 06:13 PM
Last Post: tester_V
  Windows reg extractor shappaeye 4 4,080 May-23-2020, 12:33 PM
Last Post: shappaeye
  Problem creating an archive trojantrojan 3 3,505 May-10-2020, 01:32 AM
Last Post: trojantrojan
  Invalid archive error when attempting to install dash bootstrap components meaydemi 0 5,995 Jul-11-2019, 05:49 PM
Last Post: meaydemi
  Create file archive that contains crypto hash ED209 1 3,188 May-29-2019, 03:05 AM
Last Post: heiner55

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.