Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Decrypt Lockwise file from json

  • 2 个回答
  • 1 人有此问题
  • 2 次查看
  • 最后回复者为 cor-el

more options

I am loving suing Lockwise. Now I found my encrypted password in a json file and want to decrypt it, so I can save it in a readable form, myself as a backup.

I am loving suing Lockwise. Now I found my encrypted password in a json file and want to decrypt it, so I can save it in a readable form, myself as a backup.

所有回复 (2)

more options

Sebastian said

Now I found my encrypted password in a json file and want to decrypt it, so I can save it in a readable form, myself as a backup.

It would be easiest to run code in Firefox's Browser Console to export the contents of the logins.json file. See: https://support.mozilla.org/questions/1271671

more options

You can use the below posted code in the Browser Console to export the logins to a JSON file.

You need to enable the command line in the Browser Console and paste the code in the command line.


/* EXPORT Logins to firefox-logins.json - Firefox 52 and later */

async function exportLogins (aPath, bytes){
 await OS.File.writeAtomic(aPath, bytes);
}

var tokendb = Cc["@mozilla.org/security/pk11tokendb;1"].createInstance(Ci.nsIPK11TokenDB);
var token = tokendb.getInternalKeyToken();

try {token.login(true)} catch(e) {Cu.reportError(e)}

if (!token.needsLogin() || token.isLoggedIn()) {
 var logins = Services.logins.getAllLogins({});
 var json = JSON.stringify(logins, null, 1);

 var txt = 'Logins: ' + logins.length;
 var obj = new Object; obj.value = json;

 if (Services.prompt.prompt(null, 'Logins - JSON', txt, obj, null, {})) {

 var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
 fp.init(window,"",Ci.nsIFilePicker.modeSave);
 fp.defaultString = "firefox-logins.json";

 fp.open((rv) => {
 if (rv == Ci.nsIFilePicker.returnOK || rv == Ci.nsIFilePicker.returnReplace) {
 let bytes = new TextEncoder().encode(json);
 exportLogins(fp.file.path, bytes);
 console.log("Saved as:",fp.file.path);
 }})

} else {console.log("<canceled>");} }