Class CmdLinePasswordProvider
java.lang.Object
ghidra.formats.gfilesystem.crypto.CmdLinePasswordProvider
- All Implemented Interfaces:
CryptoProvider,PasswordProvider
A
PasswordProvider that supplies passwords to decrypt files via the java jvm invocation.
Example:
java -Dfilesystem.passwords=/fullpath/to/textfile
The password file is a plain text tabbed-csv file, where each line specifies a password and an optional file identifier.
Example file contents, where each line is divided into fields by a tab character where the first field is the password and the second optional field is the file's identifying information (name, path, etc):
password1 [tab] myfirstzipfile.zip← supplies a password for the named file located in any directorysomeOtherPassword [tab] /full/path/tozipfile.zip← supplies password for file at specified locationanotherPassword [tab] file:///full/path/tozipfile.zip|zip:///subdir/in/zip/somefile.txt← supplies password for file embedded inside a zipyetAnotherPassword← a password to try for any file that needs a password
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.formats.gfilesystem.crypto.CryptoProvider
CryptoProvider.Session -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPasswordsFor(FSRL fsrl, String prompt, CryptoProvider.Session session) Returns a sequence of passwords (ordered by quality) that may apply to the specified file.
-
Field Details
-
CMDLINE_PASSWORD_PROVIDER_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
CmdLinePasswordProvider
public CmdLinePasswordProvider()
-
-
Method Details
-
getPasswordsFor
Description copied from interface:PasswordProviderReturns a sequence of passwords (ordered by quality) that may apply to the specified file.- Specified by:
getPasswordsForin interfacePasswordProvider- Parameters:
fsrl-FSRLpath to the password protected fileprompt- optional prompt that may be displayed to a usersession- a place to hold state values that persist across related queries- Returns:
Iteratorof possible passwords
-