I'm writing an window form similar to 7-Zip, my problem is in the extraction part, I don't know how to check if the archive I want to extract is password protected or not. Any idea?
Checking whether an archive is password-protected in Sevenzipsharp (C#)
1.4k Views Asked by carryall At
2
There are 2 best solutions below
0
John Weldon
On
It depends on the archive type. The ZIP specification describes how it's done for ZIP, although it's not very robust apparently.
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in PASSWORDS
- Do I have to randomize key in OpenSSL
- Xcode salting and hashing a password
- migrate one ldap server to another - questions
- Create a .txt with Password
- Hiding param of struts.xml values in Struts 2
- Detecting when CAPS LOCK is ON
- Save user and password Android
- Use MATLAB's webread to login to website and extract text
- authentication ruby valid_password error
- Linux acquire root permissions through a password popup
- I forgot the password to open a Word document. How can I retrieve the password?
- Django Rest Framework - serializer code not executing
- Transmit commands via ssh with password using expect
- Most used password in different language
- How does Maven 3 password encryption work?
Related Questions in SEVENZIPSHARP
- Decompress zip file directly from remote source
- sevenzipsharp file lock. I can't move a file?
- Why sfx sevenzipsharp '7-zip : unsupported method' when extract?
- How to extract files in my archive one by one using sevenzipsharp
- SevenZipSharp stop extracting
- SevenZipSharp CompressStreamDictionary Error
- How to pass sfx settings to the SevenZipSfx class
- Checking whether an archive is password-protected in Sevenzipsharp (C#)
- SevenZSharp Decode with password
- How can i specify string searchPattern using 7z compressor?
- How to compress PDF file using sevenzipsharper in c#?
- SevenZipSharp - how to compress multiple directories into a single file using c#?
- Using SevenZip to extract Zipped files within a zip file
- SevenZipSharp library not working on Xamarin forms
- Sevenzip compressing event not firing
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I've got the solution: just check the extractor before extracting the archive:
Doing it this way the
fileExtractor.Check()will befalse, if the archive requires a password, and you're not providing the password for it or the password is not correct.