How to unzip a password protected file through Ruby

I would like to unzip a password protected file with a password protection through a Ruby script without dropping the system call. I am currently using the rubyzip library to unpack files, but I don’t see the ability to work with encrypted files.

Does anyone know some kind of code or library that will do this?

+3
source share
5 answers

Yes, there is one that works great, by the way, I just tried and found your post in the middle.

Archive-zip

Usage example:

require 'archive/zip'
Archive::Zip.extract('example5.zip', 'a_destination', :password => 'seakrit')

I am sure it will be useful for someone else looking for the same in google :)

+3
source

. .

, , . , - () , .

+2

, , - Chilkat Ruby Zip, isn ' t . RubyZip , , zlib .

+1

, ... , .

Windows, DotNetZip COM. , Zip (), WinZip- AES.

DotNetZip .

Windows , . DotNetZip Mono. , Ruby-Mono, Ruby Mono , , DotNetZip.

0

JRuby + Java ZIP . http://www.lingala.net/zip4j () zip Apache. , .

0

Source: https://habr.com/ru/post/1709094/


All Articles