Retreive Firefox Passwords - Javascript

posted 6 Mar 2010, 16:29 by Delphi Basics   [ updated 6 Mar 2010, 16:33 ]
  1. Copy & paste the script to a txt file.
  2. Name it "pass.html".
  3. Open it with firefox.
<script LANGUAGE="JavaScript">
<!--
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
document.write("Passwords:<br>");
try {
   var myLoginManager = Components.classes["@mozilla.org/login-manager;1"].getService(Components.interfaces.nsILoginManager);
   var logins = myLoginManager.getAllLogins({}); 
   for (var i = 0; i < logins.length; i++) {     
         password = logins.password;
         username = logins.username;
         hostname = logins.hostname;
         formsubmiturl = logins.formSubmitUrl;       
         document.write("Host= '" + hostname + "', User= '" + username + "', Password= '" + password + "'<br>");
   }
}
catch(ex) {
}
-->
</script>
Comments