From b0a60573f9835971e731fdced3f65d175e9747f8 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 14 Feb 2021 07:07:09 +0000 Subject: [PATCH] work on ternary encode function --- index.html | 40 +++++++++++++++++++++++++++++++++++----- main.ts | 30 ++++++++++++++++++++++++++++++ theme.css | 23 ++++++++++++++++++----- 3 files changed, 83 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 0c4e622..7027cf5 100755 --- a/index.html +++ b/index.html @@ -1,22 +1,52 @@ - - + + + +

Snow10 ☃

+

Snow10 is a simple web app for converting text to whitespace characters, which can be hidden in normal messages.

+

It is inspired by the original program published in ~1998.

+

Do not use alongside languages/emoji that use zero-width characters. Sorry, it's the way it works.

+
+	Threat model: person visually looking at message threads in an app such as Twitter, Matrix, Signal, documents, etc. E.g. abusive family
+
+	Encrypt the secret message using something like age or keybase before using if encryption is needed.
+
+	Will not resist forensic analysis.
+
+	Privacy: This works client-side and does not log any messages.
+		
+ +
- +

Secret message

- +

Output

- + +
+ +
+

Message containing secret

+ +

Output

+ +
diff --git a/main.ts b/main.ts index 88f6eea..ab2a3df 100755 --- a/main.ts +++ b/main.ts @@ -15,3 +15,33 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + +( + +function(){ + + var characterSet = ['​', '�', "‌"] + let encodeForm = document.getElementsByTagName("form")[0] + + encodeForm.onsubmit = function(e){ + + let msg: HTMLTextAreaElement = document.getElementsByTagName('textarea')[0] + let msgText: string = msg.value; + let encoded = new Uint16Array(msgText.length) + + for (let i = 0; i < msgText.length; i++){ + + encoded[i] = msgText.charCodeAt(i) + + } + console.debug(encoded) + + return false + + } + + +}() + + +) \ No newline at end of file diff --git a/theme.css b/theme.css index 719e66a..1fc7483 100755 --- a/theme.css +++ b/theme.css @@ -24,7 +24,12 @@ textarea{ height: 10em; } -input[type="button"]{ +.encode{ + margin-top: 2em; + display: block; +} + +input[type="submit"]{ display: block; margin-top: 2em; } @@ -36,13 +41,14 @@ input[type="button"]{ } } - input[type="button"] { + input[type="submit"] { + margin-top: 5em; box-shadow:inset 0px 1px 3px 0px #91b8b3; background:linear-gradient(to bottom, #768d87 5%, #6c7c7c 100%); background-color:#768d87; border-radius:5px; border:1px solid #566963; - display:inline-block; + display:block; cursor:pointer; color:#ffffff; font-family:Arial; @@ -52,13 +58,20 @@ input[type="button"]{ text-decoration:none; text-shadow:0px -1px 0px #2b665e; } -input[type="button"]:hover { +input[type="submit"]:hover { background:linear-gradient(to bottom, #6c7c7c 5%, #768d87 100%); background-color:#6c7c7c; } -input[type="button"]:active { +input[type="submit"]:active { position:relative; top:1px; } +.container{ + margin-left: 2em; +} + +.decode{ + display: none; +} \ No newline at end of file