Comments (11)
Yes, that would be great, maybe "-EncryptFileNames" so that the name of the switch matches the name of the checkbox in the 7-Zip GUI?
Btw, do you have a PayPal.me quick link or e-mail address for small thank-you donations?
Thanks!
from 7zip4powershell.
Btw, with the new -EncryptFilenames switch, I wrote a blog article on it:
https://cyber-defense.sans.org/blog/2016/06/06/powershell-7-zip-compress-archive-encryption
from 7zip4powershell.
Thank you for your kind words.
Regarding your request: Neither ZIP nor 7-ZIP encrypt the filenames, only the content. It's in the specification, so there's nothing I can do about it.
from 7zip4powershell.
My fault, I should have mentioned, this request was only for the 7z format. So, for example, if you highlight a bunch of files in Windows File Explorer > right-click > select 7-Zip > Add to Archive > select the 7z format > then there is a checkbox to "Encrypt file names". When the 7z archive is created, the names of the files in the 7z file cannot be seen until after the password is entered. For your cmdlet, it would only apply when doing "Compress-7Zip -Format SevenZip ...".
from 7zip4powershell.
Ok, I see. Is it the same as the custom parameter he=on? Then you should be able to set it in the init scriptblock:
$initScript = {
param ($compressor)
$compressor.CustomParameters.Add("he", "on")
}
Compress-7Zip -Format SevenZip -CustomInitialization $initScript ...
from 7zip4powershell.
Yes, thank you, that $initscript did it. So, the request is: When "-Format SevenZip" and "-Password anything", can "he=on" be the default? I think this is what users are more likely to expect when encrypting archives, it's definitely more secure, and it would still leave the option of setting "he=off" with a custom init when plaintext file names is specifically wanted for some reason. Thanks
from 7zip4powershell.
7-Zip does not encrypt filenames by default, therefore I wouldn't like to enable it automatically. If someone uses 7z for encryption he has to enable the encryption explicitly, and the Powershell module should behave the same.
What I can offer is to add an -EncryptHeader
switch for convenience. Are you fine with that?
from 7zip4powershell.
Ok, I'll go with EncryptFilenames
.
Thanks for your appreciation. Nope, I don't have a PayPal.me account. I'm doing this for fun and to serve my own needs. If others benefit from my code too it's great. I have to thank you for requesting this feature. It makes 7Zip4Powershell better and may help others as well.
from 7zip4powershell.
Jason, -EncryptFilenames
is supported by the new release v1.5, which should by available in the PSGallery by now.
from 7zip4powershell.
Great article. Do you mind if I add a link to it from the readme?
from 7zip4powershell.
Sure, I hope it helps get the word out. :-)
from 7zip4powershell.
Related Issues (20)
- Increase memory used for compression HOT 1
- Handling of long paths
- Progress bar not closed when archive is corrupted
- Multiple Directories
- The execution has failed due to the bug in the SevenZipSharp HOT 5
- Add archive has password to information HOT 1
- .app archive not expanding with powershell module but with 7z.exe HOT 2
- Does not work in Powershell on Linux HOT 1
- Only extrac some files in the 7z package HOT 1
- PowerShell Core Support HOT 1
- Extending support to Powershell Core 6 and Powershell 7 on Windows
- SevenZipSharp.dll is missing in 2.0.0 pre-release version causing module import to fail HOT 11
- Parameter -VolumeSize only Int32 HOT 1
- To check if a compressed file is encripted HOT 1
- Module not respecting temp/working directory settings HOT 2
- How to Exclude specific file extension in Compress-7Zip
- Nothing happens when trying to compress, no error, nothing
- It doesn’t work at win11 22H2,but work at 21H2 bug HOT 2
- Did not find the function of writing new files to the existing archive HOT 2
- NullReferenceException on PS 7.4.0 when extracting multiple 7zip archives simultaneously HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 7zip4powershell.