Skip to content

Commit

Permalink
Merge pull request #10 from WesleyBranton/Version-2.0
Browse files Browse the repository at this point in the history
Version 2.0
  • Loading branch information
WesleyBranton committed Jun 4, 2019
2 parents 121bf0a + 050ca5a commit 7f06faa
Show file tree
Hide file tree
Showing 33 changed files with 4,110 additions and 222 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ To develop and test the extension, you need to open the "about:debugging" page i
Further documentation about developing Firefox extensions can be found [here](https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension).

## Release Notes
### Version 2.0
* **[NEW]** Updated encryption algorithm for better security
* **[NEW]** Can now share messages via links
* **[NEW]** *securesend.local* links will now launch the extension
* **[NEW]** Extension opens in popup window
* **[NEW]** Added ability to detect messages created with older version
* **[FIXED]** Extension can now tell when a password is incorrect
* **[CHANGED]** UI update
Binary file added assets/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions firefox/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

browser.browserAction.onClicked.addListener(function(){open("/popup/main.html")});
browser.webRequest.onBeforeRequest.addListener(getMessage,{urls: ["*://*.securesend.local/*","*://securesend.local/*"]},["blocking"]);

// Open window
function open(page) {
browser.windows.create({
type:"popup",
url:page
});
}

// Load message URL
function getMessage(requestDetails) {
var msg = requestDetails.url;
msg = msg.slice(msg.indexOf('?m='));
if (msg.length > 3) {
open("/popup/read.html" + msg);
}
return {cancel: true};
}
Binary file added firefox/icons/icon-128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified firefox/icons/icon-32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified firefox/icons/icon-48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified firefox/icons/icon-64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified firefox/icons/icon-96.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 20 additions & 7 deletions firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"manifest_version": 2,
"name": "Secure Send",
"version": "1.0",
"version": "2.0",
"description": "Secure your messages using encryption!",
"homepage_url": "http://securesend.clotheslinedigital.com/",
"author": "Wesley Branton",

"developer": {
"name": "Wesley Branton",
"url": "http://addons.wesleybranton.com"
},

"icons": {
"32": "icons/icon-32.png",
"48": "icons/icon-48.png",
"96": "icons/icon-96.png"
"64": "icons/icon-64.png",
"96": "icons/icon-96.png",
"128": "icons/icon-128.png"
},

"browser_action": {
"default_icon": "icons/icon-32.png",
"default_title": "Secure Send",
"default_popup": "popup/main.html"
}
"default_icon": "icons/icon-96.png",
"default_title": "Secure Send"
},

"background": {
"scripts": ["background.js"]
},

"permissions": ["storage","webRequest","webRequestBlocking","*://*.securesend.local/*","*://securesend.local/*"]
}
58 changes: 58 additions & 0 deletions firefox/popup/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->

<!DOCTYPE html>
<html>
<head>
<title>How It Works | Secure Send</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="stylesheet/theme.css"/>
<link rel="shortcut icon" href="../icons/icon-96.png"/>
</head>
<body>
<div id="container">
<header>
<img src="image/logo.jpg"/>
</header>
<section id="user-input">
<center>
<label>The internet is a scary place where you want stuff to stay private. <b>Secure Send is helping people reclaim their privacy!</b></label>
<img src="image/animation1.gif"/>
<p>If you send a letter in the mail and someone other than the intended recipient opens it, that letter is no longer private. <b>This is bad!</b></p>
<p>Sadly, the same thing can <i>(and does)</i> happen on the internet.</p>
<label>Secure Send helps to protect your messages from:</label>
<ul>
<li><i>Man in the middle</i> attacks</li>
<li>Message logging</li>
<li>Insecure messaging services</li>
<li>Unauthorized account access</li>
<li>Vulnerable computer networks</li>
<li>And more...</li>
</ul>
<img src="image/animation2.gif"/>
<label>How it works</label>
<p>Simply enter your message on Secure Send and set a password. We will lock your message using AES encryption <i>(an algorithm used by the US Government and worldwide)</i>. This transforms your message into garbled text that no one can read unless they unlock the message with your password.</p>
<p>Next, send the Secure Send generated link to the message recipient. They will be prompted to enter the password to view the message and <i>(if they enter the correct password)</i>, they will be able to read the message.</p>
<p><b>It’s that simple!</b></p>
<p>Your message is <u>encrypted on your computer</u>, so you don’t have to worry about us <i>(or anyone else)</i> seeing your message. We don’t keep any record of your message or save it on our servers.</p>
</center>
<div class="note">
<b>&#x26A0; NOTE:</b><br>
You should share your message password with the intended recipient out-of-band, meaning not through the same messaging platform you use to share the message link.<br><br>
For example, if you email the link to your message, tell the recipient the password somehow other than email <i>(in-person, telephone, SMS messaging, etc.)</i>

</div>
<div class="bar">
<button id="return" class="main-item blue">Menu</button>
</div>
</section>
<section id="loading-screen" class="hide">
<div id="loader" class="blue"></div>
</section>
</div>
<script src="script/about.js"></script>
<script src="script/navigation.js"></script>
</body>
</html>
Binary file added firefox/popup/image/animation1.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added firefox/popup/image/animation2.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added firefox/popup/image/locked.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added firefox/popup/image/logo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added firefox/popup/image/unlocked.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 34 additions & 18 deletions firefox/popup/main.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->

<!DOCTYPE html>
<html>
<head>
<title>Main Menu</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="stylesheet/theme.css"/>
</head>
<body>
<button id="send">Send<br>Message</button><br>
<button id="receive">Receive<br>Message</button>
<script src="script/menu.js"></script>
</body>
</html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->

<!DOCTYPE html>
<html>
<head>
<title>Secure Send</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="stylesheet/theme.css"/>
<link rel="shortcut icon" href="../icons/icon-96.png"/>
</head>
<body class="menu">
<div id="container">
<header>
<img src="image/logo.jpg"/>
</header>
<section id="menu-buttons">
<button id="send" class="menu-btn blue">Send<br>Message</button><br>
<button id="read" class="menu-btn purple">Read<br>Message</button><br><br>
<center>
<button id="about" class="second-item nocolor nowrap">How It Works</button><br>
<button id="terms" class="second-item nocolor nowrap">Terms of Service</button>
</center>
</section>
<section id="loading-screen" class="hide">
<div id="loader" class="blue"></div>
</section>
</div>
<script src="script/menu.js"></script>
<script src="script/navigation.js"></script>
</body>
</html>
63 changes: 63 additions & 0 deletions firefox/popup/read.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->

<!DOCTYPE html>
<html>
<head>
<title>Receive Message | Secure Send</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="stylesheet/theme.css"/>
<link rel="shortcut icon" href="../icons/icon-96.png"/>
</head>
<body class="purple">
<div id="container">
<header>
<img src="image/logo.jpg"/>
</header>
<section id="user-input" class="hide">
<div id="message-box-container" class="unloaded">
<label for="secret">Code: </label>
<textarea id="secret"></textarea>
<p>To read this message, please enter the password set by the message sender.</p>
</div>
<label for="code">Password: </label>
<input type="password" id="code" name="code"/><br><br>
<div class="bar">
<button id="load" class="main-item purple" disabled>Read Message</button>
<button id="return" class="second-item red">&times;</button>
</div>
<div class="warning" id="wrongpassword" style="display:none">
Incorrect password!
</div>
</section>
<section id="user-share" class="hide">
<div id="icon">
<img src="image/unlocked.png"/>
</div>
<h2>This message has been unlocked!</h2>
<label for="unlocked-message">Message: </label>
<textarea id="unlocked-message" readonly tabindex="-1"></textarea><br><br>
<div class="bar">
<button id="read-new" class="main-item blue" tabindex="-1">Read Another Message</button>
<button id="share-new" class="second-item red nowrap" tabindex="-1">&times;</button>
</div>
<div class="warning">
<b>&#x26A0; WARNING:</b><br>
For privacy, it's recommended that you don't save or print this message in plaintext.
</div>
</section>
<section id="loading-screen">
<div id="loader" class="purple"></div>
</section>
</div>
<script src="script/libs/buffer.js" type="text/javascript"></script>
<script src="script/libs/unorm.js" type="text/javascript"></script>
<script src="script/libs/scrypt.js" type="text/javascript"></script>
<script src="script/libs/generate.js" type="text/javascript"></script>
<script src="script/libs/index.js" type="text/javascript"></script>
<script src="script/navigation.js"></script>
<script src="script/decrypt.js"></script>
</body>
</html>
27 changes: 0 additions & 27 deletions firefox/popup/receive.html

This file was deleted.

5 changes: 5 additions & 0 deletions firefox/popup/script/about.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

document.getElementById('return').addEventListener('click',function(){nav('main')});

0 comments on commit 7f06faa

Please sign in to comment.