Open Dowhanych opened 6 years ago
Thank you for flagging this. We only support basic encryption from the original spec. This error might be due to unsupported encryption method, or it could be an error in the stream
method.
Can you share a zip file with password qqq
that doesn't work?
Also can you try the other methods (for example .buffer('qqq')
?
Yes encryption was AES-256. Buffer don`t work too. With ZipCrypto work perfect.
Is it possible to make AES-256 in next version?
It's not on my radar right now, but would really appreciate any PR with improvements!
Missing the feature for AES-128 and AES-256
Nothing?
try this:
const filePath = YOUR_FILE_PATH const decryptPass = YOUR_PASSWORD const outputPath = YOUT_OUTPUT_PATH
return new Promise( (resolve, reject) => { var exec = require('child_process').exec; var cmd = '7z x ' + filePath + ' -p"' + decryptPass + '" -y -o"' + outputPath + '"'; exec(cmd, function (err){ if (err){ reject(err); } else { resolve(outputPath); } }); }
try this:
const filePath = YOUR_FILE_PATH const decryptPass = YOUR_PASSWORD const outputPath = YOUT_OUTPUT_PATH
return new Promise( (resolve, reject) => { var exec = require('child_process').exec; var cmd = '7z x ' + filePath + ' -p"' + decryptPass + '" -y -o"' + outputPath + '"'; exec(cmd, function (err){ if (err){ reject(err); } else { resolve(outputPath); } }); }
Thank you! I used python and could do it. But it seems to work also (didn't test) and will definitely help other people.
Any update on this feature? Or at least someone that had solved this using javascript?
Also looking for this feature for nodejs! Any alternatives?
I managed to do it using minizip-asm.js:
const mz = new Minizip(buffer);
data = mz.extract('file.xml', {password});
I managed to do it using minizip-asm.js:
const mz = new Minizip(buffer); data = mz.extract('file.xml', {password});
Though a solution, Minizip's latest version is >8yrs old. AES256 would still be nice to have on here which seems a pretty complete package otherwise.
System not understand passwords whitch put to open zip. unzipper.Open.file('test123_3/lol.zip') .then(function(d) { return new Promise(function(resolve,reject) { console.log(d.files[0]); d.files[0].stream("qqq") }); });