-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
588 lines (503 loc) · 23.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Share Password Online - Send Encrypted Passwords Online</title>
<meta name="description" content="Share Password Online is a free service to send encrypted passwords online. Send passwords securely to your friends, family, and colleagues.">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#f6792b">
<meta name="msapplication-TileColor" content="#f6792b">
<meta name="theme-color" content="#f6792b">
<style type="text/css">
* {
box-sizing: border-box;
margin: 0;
padding: 0;
line-height: 1;
}
:root {
--accent-color: #ff9800;
--accent-color-dark: #e67e00;
--background-color: #ffecd0;
--form-background-color: #ffffff;
--text-color: #333333;
--text-color-muted: #666666;
--input-border-color: #cccccc;
--readonly-background-color: #e9e9e9;
--readonly-border-color: #999999;
--border-radius: 0.5rem;
--gap: 1rem;
}
body {
min-height: 100dvh;
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: var(--background-color);
color: var(--text-color);
background: var(--background-color);
background: linear-gradient(to right bottom, #FFFFFF, var(--background-color));
}
main {
place-items: center;
align-content: center;
}
h1 {
font-size: 2rem;
text-align: center;
}
h1 a {
color: inherit;
text-decoration: none;
transition: all 0.3s ease-in-out;
}
h1 a:hover {
color: var(--accent-color-dark);
}
p {
line-height: 1.45;
}
p:has(~ p) {
margin-bottom: var(--gap);
}
form {
background-color: var(--form-background-color);
border-radius: var(--border-radius);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: clamp(280px, 90vw, 1024px);
}
label {
display: block;
font-size: 1rem;
}
label {
display: inline-flex;
align-items: center;
gap: var(--gap);
font-size: 1rem;
margin-bottom: 5px;
}
svg {
height: 1em;
width: 1em;
fill: currentColor;
}
input,
textarea {
font: inherit;
font-size: 1.25rem;
padding: 8px;
width: 100%;
border: 1px solid var(--input-border-color);
border-radius: var(--border-radius);
}
textarea {
--rows: 5;
min-height: calc(1.25rem * var(--rows) + 8px * var(--rows) + 1px * var(--rows));
}
@media screen and (min-width: 768px) {
textarea {
--rows: 2;
}
}
input:read-only {
background-color: var(--readonly-background-color);
border-color: var(--readonly-border-color);
}
button {
--gap: 1rem;
--button-color: #333;
--button-background-color: #ccc;
--button-background-color-hover: #bbb;
--button-background-color-active: #666;
display: inline-flex;
align-items: center;
gap: calc(var(--gap) / 4);
background-color: var(--button-background-color);
color: var(--button-color);
justify-self: center;
font-size: 1rem;
padding: calc(var(--gap) / 1.5) var(--gap);
border: none;
border-radius: var(--border-radius);
cursor: pointer;
transition: all 0.3s ease;
}
button svg {
height: 1em;
width: 1em;
fill: currentColor
}
button:hover {
background-color: var(--button-background-color-hover);
}
button:active {
background-color: var(--button-background-color-active);
}
button[type="submit"] {
--button-color: #fff;
--button-background-color: var(--accent-color);
--button-background-color-hover: var(--accent-color-dark);
--button-background-color-active: var(--accent-color);
}
button.button-small {
font-size: 0.8rem;
padding: calc(var(--gap) / 2) var(--gap);
}
dialog {
border: none;
border-radius: var(--border-radius);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 100vw rgb(0 0 0 / 0.5);
padding: var(--gap);
width: 100%;
max-width: clamp(280px, 90vw, 1024px);
background-color: var(--form-background-color);
opacity: 0;
transition: all 1s ease;
pointer-events: none;
margin: auto;
}
dialog[open] {
display: grid;
gap: var(--gap);
pointer-events: auto;
animation: slide-down 500ms forwards, fade-in 250ms forwards;
}
dialog[closing] {
pointer-events: none;
inset: 0;
animation: fade-out 250ms forwards;
}
dialog::backdrop {
background: rgb(0 0 0 / 0.5);
opacity: 0;
}
/* Utility classes */
.flex-inline {
display: flex;
flex-wrap: wrap;
gap: var(--gap);
align-items: center;
}
.even-spacing {
--gap: 1rem;
display: grid;
gap: var(--gap);
padding: var(--gap);
}
.even-spacing--large {
--gap: 2rem;
}
@media screen and (min-width: 768px) {
.even-spacing--desktop--large {
--gap: 2rem;
}
}
.even-spacing--small {
--gap: 0.2rem;
}
.text {
color: var(--text-color-muted);
max-width: clamp(280px, 90vw, 1024px);
margin: auto;
}
.text-center {
text-align: center;
}
.text-small {
font-size: 0.6em;
}
.display-none {
display: none;
}
/* Validation */
form.validated input:valid {
--hue: 122;
--saturation: 39%;
--lightness: 49%;
border-color: hsla(var(--hue), var(--saturation), var(--lightness), 0.5);
outline: none;
background-color: hsla(var(--hue), var(--saturation), var(--lightness), 0.1);
}
form.validated input:invalid {
--hue: 4;
--saturation: 90%;
--lightness: 58%;
border-color: hsla(var(--hue), var(--saturation), var(--lightness), 0.5);
outline: none;
background-color: hsla(var(--hue), var(--saturation), var(--lightness), 0.1);
}
form.validated input:hover,
form.validated input:focus {
box-shadow: 0 2px 5px hsla(var(--hue), var(--saturation), var(--lightness), 0.5);
}
/* Components */
/* Components: ToolTip */
.tooltip-container {
display: inline-flex;
position: relative;
align-items: center;
justify-content: center;
cursor: pointer;
}
.tooltip--hover:hover .tooltip {
opacity: 1;
}
.tooltip {
position: absolute;
bottom: calc(100% + 10px);
left: 50%;
transform: translateX(-50%);
transition: opacity 0.3s ease-in-out;
opacity: 0;
pointer-events: none;
width: max-content;
max-width: 16ch;
}
.tooltip-container.active .tooltip {
opacity: 1;
}
.tooltip-inner {
background-color: rgba(0, 0, 0, 0.8);
color: #fff;
padding: 5px 10px;
border-radius: 3px;
font-size: 0.8rem;
text-align: center;
}
.tooltip::before {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border-width: 5px;
border-style: solid;
border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Reveal Password */
.input-with-button {
position: relative;
}
.input-with-button button {
position: absolute;
top: 50%;
right: var(--gap);
transform: translateY(-50%);
border: none;
background: none;
cursor: pointer;
padding: 0;
margin: 0;
font-size: 1.2rem;
color: var(--button-background-color);
}
.input-with-button button:hover {
color: var(--button-background-color-hover)
}
.input-with-button button:active {
color: var(--button-background-color-active)
}
/* Animations */
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes slide-down {
0% {
transform: translateY(-20%);
}
100% {
transform: translateY(0%);
}
}
@keyframes shakeX {
from,
to {
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
transform: translate3d(10px, 0, 0);
}
}
.shake {
animation: shakeX 0.82s cubic-bezier(.36, .07, .19, .97) both;
}
</style>
</head>
<body>
<main class="even-spacing even-spacing--desktop--large">
<h1><a href="/">Share Password Online</a></h1>
<h2 class="text text-center">The world's most popular Password Sharing Service<sup class="text-small">1</sup></h2>
<p class="text text-center" data-autohide="hide-on-decrypt">Sharing passwords over the internet is never a great idea. However, if it's absolutely necessary, use this page to encrypt your sensitive information (e.g., password, credit card number, etc.) and share the generated link and passphrase through two separate channels (e.g., text and phone call, WhatsApp and Signal, Slack and
in-person
communication).</p>
<form class="even-spacing" data-id="encryption-form" novalidate>
<div class="even-spacing even-spacing--small" data-id="secret-container">
<label for="message">
Secret:
<div class="tooltip-container tooltip--hover" aria-describedby="tooltip-help-secret">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" />
</svg>
<div class="tooltip" id="tooltip-help-secret">
<div class="tooltip-inner">
The secret you want to share. It can be a password, a credit card number or some other sensitive information.
</div>
</div>
</div>
</label>
<div class="input-with-button">
<input type="text" id="message" data-id="message" name="message" required maxlength="512" autocomplete="off" autofocus="true">
<button type="button" data-class="copy" data-copy-target="[data-id='message']" aria-label="Copy secret value">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path d="M272 0H396.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128H192v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z" />
</svg>
</button>
</div>
</div>
<div class="even-spacing even-spacing--small">
<label for="passphrase">
Passphrase:
<div class="tooltip-container tooltip--hover" aria-describedby="tooltip-help-passphrase">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" />
</svg>
<div class="tooltip" id="tooltip-help-passphrase">
<div class="tooltip-inner">
This phrase is used to encrypt and decrypt the secret.
</div>
</div>
</div>
</label>
<div class="input-with-button">
<input type="password" id="passphrase" data-id="passphrase" name="passphrase" required>
<button type="button" data-id="reveal-password" aria-label="Toggle view/hide passphrase">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path
d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z" />
</svg>
</button>
</div>
</div>
<button type="submit" data-autohide="hide-on-decrypt">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path d="M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z" />
</svg>
Generate Link
</button>
<button type="submit" class="display-none" data-autohide="hide-on-encrypt">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path d="M144 144c0-44.2 35.8-80 80-80c31.9 0 59.4 18.6 72.3 45.7c7.6 16 26.7 22.8 42.6 15.2s22.8-26.7 15.2-42.6C331 33.7 281.5 0 224 0C144.5 0 80 64.5 80 144v48H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V256c0-35.3-28.7-64-64-64H144V144z" />
</svg>
Decrypt
</button>
</form>
<div class="even-spacing text">
<div class="even-spacing even-spacing--small">
<h2>How does this work?</h2>
<p>Enter a secret and a passphrase. The passphrase is used to encrypt the secret and generate a link. This link can then be sent to the recipient. You also need to tell the recipient the passphrase in a separate way. The recipient can enter the passphrase to decrypt the secret.</p>
</div>
<div class="even-spacing even-spacing--small">
<h2>Is this safe?</h2>
<p>Encryption, link generation, and decryption occur 100% on the client side. <strong>Nothing is stored or tracked</strong>. It's just plain HTML and vanilla JavaScript! Right-click and inspect the code yourself or <a href="https://github.com/ptmrio/SharePasswordOnline">visit GitHub to examine it there</a>. As long as your device and the recipient's device are secure, this should
be a pretty safe way to send and receive passwords.</p>
<p>But please, still be careful. Share secrets only with people you trust!</p>
</div>
<div class="even-spacing even-spacing--small">
<h2>How does SharePassword.online differ from other services?</h2>
<p>Most other services store the (encrypted) secret on their server's backend. Although this may be secure in most instances, it still carries a slight risk. In contrast, Sharepassword.online does not store any information. The generated link is not retained or recorded in any form; it merely represents the outcome of the encryption process. Furthermore every link is unique, even
though it might use the same secret and passphrase combination.</p>
</div>
<div class="even-spacing even-spacing--small">
<h2><sup class="text-small">1</sup>Is this really the most popular service for sharing passwords?</h2>
<p>We have no idea because we don't track anything 🤷, but we like the app, so we hope it is.</p>
</div>
<div class="even-spacing even-spacing--small">
<h2>Thanks, can I contribue?</h2>
<p>You may contribute on <a href="https://github.com/ptmrio/SharePasswordOnline">GitHub</a>. Alternatively, may I suggest you buy me a beer?</p>
<p>PayPal: <a href="https://www.paypal.com/paypalme/my/profile">paypal.me/Petermeir</a></p>
<p>
<div class="flex-inline">
<span>Bitcoin Address:</span>
<div class="tooltip-container">
<button class="button-small" data-class="copy" data-copy="3JzyeyJBhRws83PdiiaQ2KzcCZPZumnigX">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path d="M272 0H396.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128H192v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z" />
</svg>
Copy Address 3Jz...igX
</button>
<div class="tooltip">
<div class="tooltip-inner">
Copied!
</div>
</div>
</div>
</div>
</p>
</div>
</div>
<dialog class="even-spacing" data-id="link-dialog">
<h2>Generated Link</h2>
<div class="even-spacing even-spacing--small">
<p id="generated-link-description">Copy this link and send it through your preferred method. Share the passphrase <strong>separately</strong> to ensure the security of the secret:</p>
<div class="tooltip-container">
<label for="generated-link" class="visually-hidden">Generated Link</label>
<textarea type="text" id="generated-link" data-id="generated-link" data-class="copy" rows="2" readonly aria-describedby="generated-link-description"></textarea>
<div class="tooltip">
<div class="tooltip-inner">
Copied!
</div>
</div>
</div>
</div>
<button data-id="close-dialog">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z" />
</svg>
Close
</button>
</dialog>
</main>
<script src="main.js"></script>
</body>
</html>