-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d6c20bf
Showing
6 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ledger Blue : chrome extension for Slack | ||
|
||
This is a proof of concept to showcase how the Ledger Blue can be used to secure communication channels such as Slack. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello! |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
injectScript(chrome.extension.getURL( "/" ), "inject.js"); | ||
|
||
function injectScript (aBasePath, aScriptURL) { | ||
var codeInjection = document.createElement("script"); | ||
codeInjection.src = aBasePath + aScriptURL; | ||
codeInjection.async = false; | ||
(document.body || document.head || document.documentElement).appendChild(codeInjection); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
initSlackBridge(); | ||
|
||
function initSlackBridge() { | ||
$("#message-input").off("keydown"); | ||
$("#message-input").on("keydown", function(event) { | ||
if (event.which == 13) { | ||
onMessageSubmit(); | ||
} | ||
}); | ||
$("#message-form").attr('onsubmit', "onMessageSubmit(); return false;"); | ||
} | ||
function onMessageSubmit() { | ||
message = $("#message-input").val(); | ||
message = message.rot13(); | ||
$("#message-input").val(message) | ||
TS.view.submit(); | ||
$("#message-input").val(undefined) | ||
} | ||
function unscramble() { | ||
$.each($(".message_body"), function(index,e) { | ||
text = $(e).text(); | ||
$(e).text(text.rot13()); | ||
}); | ||
} | ||
|
||
String.prototype.rot13 = function(){ | ||
return this.replace(/[a-zA-Z]/g, function(c){ | ||
return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26); | ||
}); | ||
}; | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Ledger Blue Slack extension", | ||
"description": "Encrypt a slack chat room using the Blue API", | ||
"version": "0.1", | ||
"content_scripts": [ | ||
{ | ||
"matches": ["https://*.slack.com/*"], | ||
"js": ["jquery-2.1.4.min.js", "bridge.js"] | ||
} | ||
], | ||
"background": { | ||
"page": "background.html" | ||
}, | ||
"web_accessible_resources": [ "inject.js" ], | ||
"manifest_version": 2 | ||
} |