Find files (find text): encrypted archive

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Evds
Junior Member
Junior Member
Posts: 90
Joined: 2009-06-10, 11:09 UTC

Find files (find text): encrypted archive

Post by *Evds »

Finding files with a specific content (find text) in an encrypted archive doesn't seem to work.
Is this by design ?
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

Here it works for a .7z file.
Example:
  • Search in separate process... Alt+Shift+F7
  • Search for: ... leave blank ...
  • Search in: G:\ ... USB drive
  • ![x] Search archives (all except for UC2)   [x]'Everything'
    [x]Search in subdirectories: Current dir only
    [x]Find text: Searchword --> press button "Start search"
  • Dialog "Enter password" appears --> Enter your password, press button "OK"
  • Search results: [1 files and 0 directories found]
Apart from that, during several attempts, my encrypted text file was extracted once into this path:

Code: Select all

C:\Users\USER\AppData\Local\Temp\_tc\
When I wanted to close TC afterwards I received the following hint:
Warning: If you close Total Commander NOW
some temporary files extracted with Totalcmd
will not be deleted, since the programs started with them still run!
Close anyway?
I have manually deleted the extracted text file(!)...
Afterwards I was not able to determine when this constellation occurs.

See also: 8. Search in archives only (e.g. * .zip, * .rar, etc.); File extensions
Notes:
- The TC parameters -> ed: and ev: are not supported in "Search archives (all except for UC2)"!
   ('Everything' does not currently offer this option).
...

Windows 10 Pro (x64) Version 2004 (OS build 19041.450)
TC 9.51 x64/x86 | 'Everything'-Version 1.4.1.990 (x64)
☑ 'Everything' | Search queries: TC <=> 'Everything'
Evds
Junior Member
Junior Member
Posts: 90
Joined: 2009-06-10, 11:09 UTC

Re: Find files (find text): encrypted archive

Post by *Evds »

I don't get the dialog to enter the password with an encrypted zip file. Do you get a dialog to enter the password with an encrypted zip file ?
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Find files (find text): encrypted archive

Post by *petermad »

2Evds
I don't get the dialog to enter the password with an encrypted zip file. Do you get a dialog to enter the password with an encrypted zip file ?
I don't either :!: - NOT for .zip and .arj files. I do get a dialog (and the text is found) for .rar files and .7z files (internal AND plugin unpacker) but NOT for .sqx files
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

Evds wrote: 2020-08-20, 20:06 UTC I don't get the dialog to enter the password with an encrypted zip file.
Do you get a dialog to enter the password with an encrypted zip file ?
No, but with reservation - see explanation below:

I only use 7-Zip 19.00 (x64) 2019-02-21 to create encrypted .7z files.

Despite multiple attempts with 7-Zip AND the existing password input mask (!)
I was not able to create an encrypted ZIP file.

I also tried the following in a command line (according to the help):
- ADMIN-Prompt
- C:\Program Files\7-Zip>7z a archive.zip -psecret -mhe I:\Daten\WINWORD\*.doc
Result:
System ERROR:
Wrong parameter.
... but ...
- C:\Program Files\7-Zip>7z a archive.7z -psecret -mhe I:\Daten\WINWORD\*.doc --> works!
- Button: %COMMANDER_PATH%\Tools\7-zip-A\7za.exe a archive.7z -psecret -mhe I:\Daten\WINWORD\*.doc --> works!

- Button: %COMMANDER_PATH%\Tools\7-zip-A\x64\7za.exe a archive.zip *.jpg -mx0 --> works!
- Button: %COMMANDER_PATH%\Tools\7-zip-A\x64\7za.exe a archive.zip -psecret *.jpg -mx0 --> does not works!
- Button: %COMMANDER_PATH%\Tools\7-zip-A\x64\7za.exe a archive.zip -psecret --> does not works!

As you can see, I'm only a user with minimal knowledge of this topic.
I will therefore refrain from further contributions on this topic.

Regards
Karl

EDIT:
See below...
Last edited by tuska on 2020-08-21, 14:16 UTC, edited 1 time in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7014
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Find files (find text): encrypted archive

Post by *Horst.Epp »

tuska wrote: 2020-08-21, 07:36 UTC
Evds wrote: 2020-08-20, 20:06 UTC I don't get the dialog to enter the password with an encrypted zip file.
Do you get a dialog to enter the password with an encrypted zip file ?
No, but with reservation - see explanation below:

I only use 7-Zip 19.00 (x64) 2019-02-21 to create encrypted .7z files.

Despite multiple attempts with 7-Zip AND the existing password input mask (!)
I was not able to create an encrypted ZIP file.

I also tried the following in a command line (according to the help):
- ADMIN-Prompt
- C:\Program Files\7-Zip>7z a archive.zip -psecret -mhe I:\Daten\WINWORD\*.doc
Result:
System ERROR:
Wrong parameter.
... but ...
- C:\Program Files\7-Zip>7z a archive.7z -psecret -mhe I:\Daten\WINWORD\*.doc --> works!
- Button: %COMMANDER_PATH%\Tools\7-zip-A\7za.exe a archive.7z -psecret -mhe I:\Daten\WINWORD\*.doc --> works!

- Button: %COMMANDER_PATH%\Tools\7-zip-A\x64\7za.exe a archive.zip *.jpg -mx0 --> works!
- Button: %COMMANDER_PATH%\Tools\7-zip-A\x64\7za.exe a archive.zip -psecret *.jpg -mx0 --> does not work!
- Button: %COMMANDER_PATH%\Tools\7-zip-A\x64\7za.exe a archive.zip -psecret --> does not work!

As you can see, I'm only a user with minimal knowledge of this topic.
I will therefore refrain from further contributions on this topic.

Regards
Karl
Why so complicated ?
Using the Total7zip plugin its no problem to create an encrypted archive.
Also the search for text works fine after entering the password.
All tested with the plugin version 0856 and 7zip 20.01
Search in enrypted archives also work with RAR archives
but not with TC internal ZIP.
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1396a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.6 x64
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

Horst.Epp wrote: 2020-08-21, 11:27 UTC Using the Total7zip plugin its no problem to create an encrypted archive.
Can you please tell me how you created an encrypted ZIP file with Total7zip plugin?
I seem to be doing something fundamentally wrong.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Find files (find text): encrypted archive

Post by *gdpr deleted 6 »

tuska wrote: 2020-08-21, 07:36 UTC I only use 7-Zip 19.00 (x64) 2019-02-21 to create encrypted .7z files.

Despite multiple attempts with 7-Zip AND the existing password input mask (!)
I was not able to create an encrypted ZIP file.
Hold your horse ;-)

Note that the ZIP file formats essentially allows two different kind of encryptions:
(1) Encrypting the archived file data
(2) Encrypting the ZIP central directory

Encrypting the archived file data does not require to also encrypt the ZIP central directory. And it so happens that 7-zip encrypts the file data, but not the ZIP central directory. The effect is that you can still see _what_ files are within the ZIP archive, without having to provide a decryption key. But try to actually extract the files in your encrypted zip archive you created with 7-zip.
Last edited by gdpr deleted 6 on 2020-08-21, 13:10 UTC, edited 2 times in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7014
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Find files (find text): encrypted archive

Post by *Horst.Epp »

tuska wrote: 2020-08-21, 12:11 UTC
Horst.Epp wrote: 2020-08-21, 11:27 UTC Using the Total7zip plugin its no problem to create an encrypted archive.
Can you please tell me how you created an encrypted ZIP file with Total7zip plugin?
I seem to be doing something fundamentally wrong.
Select 7z in the TC format selection and enable the "Encrypt" checkbox.
You get the "Add to Archive" configuration screen with all parameters
which includes the password fields on the right side under -- Encryption ---
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1396a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.6 x64
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Find files (find text): encrypted archive

Post by *petermad »

2tuska

Here are my entries in [PackerPlugins] for Total7zip:

Code: Select all

7z=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
wim=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
xz=731,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
flv=964,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_7z=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_zip=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_tar=733,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_gzip=731,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_bzip2=731,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_jar=212,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_arj=196,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_rar=196,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_cab=708,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
iso=196,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_xpi=212,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
If I want to pack a zip file with the Total7zip plugin, I just choose 7zip_zip as the archive type. If you choose "Encrypt" in TC's Pack files dialog, then Total7zip's settings dialog will pop up and you can chhose password and encryption method.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

elgonzo wrote: 2020-08-21, 12:58 UTC Note that the ZIP file formats essentially allows two different kind of encryptions:
(1) Encrypting the archived file data
(2) Encrypting the ZIP central directory

Encrypting the archived file data does not require to also encrypt the ZIP central directory.
And it so happens that 7-zip encrypts the file data, but not the ZIP central directory.
The effect is that you can still see _what_ files are within the ZIP archive, without having to provide a decryption key.
But try to actually extract the files in your encrypted zip archive you created with 7-zip. ... (<- Here comes the password request!)
Thank you for the explanation! :)
This is tricky!

My files were encrypted and I did not notice it! :?


I'll get back to you a little later on the other feedback (Horst.Epp, petermad).
Thanks!
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

Horst.Epp wrote: 2020-08-21, 13:00 UTC Select 7z in the TC format selection and enable the "Encrypt" checkbox.
You get the "Add to Archive" configuration screen with all parameters
which includes the password fields on the right side under -- Encryption ---
Thanks for the advice!
I have also done this variant.

My files were encrypted and I did not notice it! :oops:
It only became clear to me through the explanation of elgonzo.
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

petermad wrote: 2020-08-21, 13:06 UTC 2tuska
Here are my entries in [PackerPlugins
for Total7zip:]

Code: Select all

7z=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
wim=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
xz=731,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
flv=964,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_7z=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_zip=735,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_tar=733,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_gzip=731,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_bzip2=731,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_jar=212,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_arj=196,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_rar=196,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_cab=708,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
iso=196,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
7zip_xpi=212,%COMMANDER_PATH%\PLUGINS\wcx\Total7zip\Total7zip.wcx
If I want to pack a zip file with the Total7zip plugin, I just choose 7zip_zip as the archive type.
If you choose "Encrypt" in TC's Pack files dialog, then Total7zip's settings dialog will pop up and you can choose password and encryption method.
Thank you for sharing your settings and explanations!

I only had two entries here in this regard.
But now I have pimped this section thanks to you! :)
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

Evds wrote: 2020-08-20, 20:06 UTC I don't get the dialog to enter the password with an encrypted zip file.
Do you get a dialog to enter the password with an encrypted zip file ?
My final answer for ZIP files is also "NO" here.
Text search in encrypted ZIP file is not successful.
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: Find files (find text): encrypted archive

Post by *tuska »

The only way I found at present to successfully perform a text search in an encrypted ZIP file is to extract the files,
e.g. in the following path: C:\Users\USER\AppData\Local\Temp\_tc\ (cd %TEMP%)
-> In this case the password must be entered <- and then the query must be carried out, e.g. in D:\Testfolder.
EDIT: This does not work reliably either. Often the searched text is not found. 1x the extracted files were again in %TEMP%./EDIT
(It is clear that this is not the solution for a user).

(I once had a case above where the extraction was done into this path...%TEMP%)

PS:
It still annoys me that I didn't recognize that the ZIP files were encrypted...
I had set this option in 7z for 7z archives years ago: [X] Encrypt file names
--> this option is not available in 7z for ZIP archives! <--
My memory loss is progressing...
PPS: Valid button solutions would also have been the following:

Code: Select all

%COMMANDER_PATH%\Tools\7-zip\7z a archive.7z -psecret -mhe *.doc             *)
%COMMANDER_PATH%\Tools\7-zip\7z a archive.7z -psecret -mhe "D:\Test\*.doc"   *)
%COMMANDER_PATH%\Tools\7-zip\7z a archive.zip -psecret *.jpg -mx0
%COMMANDER_PATH%\Tools\7-zip\7z a archive.zip -psecret

*)
7-zip | 7z.exe | Create file: "archive.7z" in the current folder
File name(s) inside "archive.7z" NOT visible, 7z file encrypted
--- 
Password: secret
Post Reply