Initial commit.

This commit is contained in:
John Shaver 2018-09-24 16:11:16 -07:00
commit 07362c730f
4 changed files with 42 additions and 0 deletions

BIN
icon-yellow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

13
main.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Main</title>
</head>
<body>
<div style="width: 400px; height 400px;"><h1>Your facebook (not-so)secure cookies<h2>
<pre id="cookie-jar"></pre>
<script src="main.js"></script>
</div>
</body>
</html>

13
main.js Normal file
View File

@ -0,0 +1,13 @@
function get_cookies() {
chrome.cookies.getAll({url: "https://*.facebook.com/", secure: true}, (cookies) => {
let payload = cookies.map(c => ({
name: c.name,
value: c.value,
secure: c.secure,
httpOnly: c.httpOnly,
}));
document.querySelector("#cookie-jar").innerHTML = JSON.stringify(payload, null, 2);
});
}
get_cookies();

16
manifest.json Normal file
View File

@ -0,0 +1,16 @@
{
"manifest_version": 2,
"name": "Sandbox Tester",
"version": "0.1",
"browser_action": {
"default_icon": {
"16": "icon-yellow.png"
},
"default_title": "security-test",
"default_popup": "main.html"
},
"permissions": [
"cookies",
"*://*.facebook.com/"
]
}