Merge remote-tracking branch 'origin/patch'

This commit is contained in:
Ryan Kurtz
2023-06-30 13:04:11 -04:00
14 changed files with 128 additions and 58 deletions
@@ -23,6 +23,7 @@ import java.util.Arrays;
import java.util.List;
import ghidra.app.script.GhidraScript;
import ghidra.framework.generic.auth.Password;
import ghidra.framework.model.DomainFile;
import ghidra.framework.model.DomainFolder;
import ghidra.program.model.address.Address;
@@ -117,6 +118,10 @@ public class AskScript extends GhidraScript {
boolean yesOrNo = askYesNo("yes or no", "is this a yes/no question?");
println("Yes or No? " + yesOrNo);
try (Password password = askPassword("Password", null)) {
println("Password has %d characters".formatted(password.getPasswordChars().length));
// try-with-resources ensures buffer is zeroed out before garbage collected
}
}
catch (IllegalArgumentException iae) {
Msg.warn(this, "Error during headless processing: " + iae.toString());