Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting files names inside a rar/zip file without unzip

Does anyone know if it is possible to get the name of files inside a rar/zip without having to unrar/unzip the file.. and if yes, is there a way to block it or make difficult..

Thanks

like image 279
Rodrigo Pereira Avatar asked Nov 24 '25 05:11

Rodrigo Pereira


2 Answers

The file names in a zip file are visible even if the data is encrypted. If you want to hide the names, the easy solution is to zip the zip file encrypted.

Later versions of PKZip do have an option to encrypt the file names as well with –cd=encrypt. (cd means central directory.)

like image 159
Mark Adler Avatar answered Nov 25 '25 19:11

Mark Adler


The -l flag to unzip(1) does just that:

-l list archive files (short format). The names, uncompressed file sizes and modification dates and times of the specified files are printed, along with totals for all files specified.

unrar(1) has the l option:

l List archive content.

like image 45
Carl Norum Avatar answered Nov 25 '25 19:11

Carl Norum



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!