payload-verifier.php (27502B)
1 <?php 2 // Made by Dasho 3 // You can generate a good random salt value from the PHP CLI like this: php -r "echo bin2hex(random_bytes(16));" 4 // The resulting string will look like this: 7674ffcd9882e411415ea1ab7726642d 5 6 /* 7 This is a copy of the script that is used on verify.dasho.dev. It is provided here for reference purposes only. You can use it too, by creating and setting your own salt value in the SALT constant below, and by setting the $key variable to the key you want to use on line 108. 8 */ 9 10 define('SALT', sodium_hex2bin('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')); 11 12 $b91_enctab = array( 13 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 14 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 15 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 16 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 17 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!', '#', '$', 18 '%', '&', '(', ')', '*', '+', ',', '.', '/', ':', ';', '<', '=', 19 '>', '?', '@', '[', ']', '^', '_', '`', '{', '|', '}', '~', '"' 20 ); 21 22 $b91_dectab = array_flip($b91_enctab); 23 24 function base91_decode($d) { 25 global $b91_dectab; 26 $n = $b = $o = null; 27 $l = strlen($d); 28 $v = -1; 29 for ($i = 0; $i < $l; ++$i) { 30 $c = $b91_dectab[$d[$i]]; 31 if(!isset($c)) 32 continue; 33 if($v < 0) 34 $v = $c; 35 else { 36 $v += $c * 91; 37 $b |= $v << $n; 38 $n += ($v & 8191) > 88 ? 13 : 14; 39 do { 40 $o .= chr($b & 255); 41 $b >>= 8; 42 $n -= 8; 43 } while ($n > 7); 44 $v = -1; 45 } 46 } 47 if($v + 1) 48 $o .= chr(($b | $v << $n) & 255); 49 return $o; 50 } 51 52 function base91_encode($d) { 53 global $b91_enctab; 54 $n = $b = $o = null; 55 $l = strlen($d); 56 for ($i = 0; $i < $l; ++$i) { 57 $b |= ord($d[$i]) << $n; 58 $n += 8; 59 if($n > 13) { 60 $v = $b & 8191; 61 if($v > 88) { 62 $b >>= 13; 63 $n -= 13; 64 } else { 65 $v = $b & 16383; 66 $b >>= 14; 67 $n -= 14; 68 } 69 $o .= $b91_enctab[$v % 91] . $b91_enctab[$v / 91]; 70 } 71 } 72 if($n) { 73 $o .= $b91_enctab[$b % 91]; 74 if($n > 7 || $b > 90) 75 $o .= $b91_enctab[$b / 91]; 76 } 77 return $o; 78 } 79 80 function saltify_encrypt($message, $key) { 81 $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES); 82 $cipher = base91_encode($nonce.sodium_crypto_secretbox($message, $nonce, $key)); 83 sodium_memzero($message); 84 sodium_memzero($key); 85 return $cipher; 86 } 87 88 function saltify_decrypt($encrypted, $key) { 89 $decoded = base91_decode($encrypted); 90 if($decoded === false) return false; 91 if(mb_strlen($decoded, '8bit') < (SODIUM_CRYPTO_SECRETBOX_NONCEBYTES + SODIUM_CRYPTO_SECRETBOX_MACBYTES)) return false; 92 $nonce = mb_substr($decoded, 0, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, '8bit'); 93 $ciphertext = mb_substr($decoded, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, null, '8bit'); 94 $plain = sodium_crypto_secretbox_open($ciphertext, $nonce, $key); 95 if($plain === false) return false; 96 sodium_memzero($ciphertext); 97 sodium_memzero($key); 98 return $plain; 99 } 100 101 function saltify_key($key) { 102 $key = sodium_crypto_pwhash(32, $key, SALT, SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE); 103 return $key; 104 } 105 106 if(isset($_REQUEST['payload'])) { 107 $payload = $_REQUEST['payload']; 108 $key = '/* YOUR KEY HERE */'; 109 $saltify_key = saltify_key($key); 110 111 $pl = $payload; 112 113 $pl = str_replace('-- BEGIN VERIFICATION PAYLOAD --', '', $pl); 114 $pl = str_replace('-- END VERIFICATION PAYLOAD --', '', $pl); 115 $pl = str_replace("\n", '', $pl); 116 $pl = str_replace("\r", '', $pl); 117 $pl = str_replace(' ', '', $pl); 118 119 // is the resulting payload something that comes back as valid? 120 $dec = saltify_decrypt($pl, $saltify_key); 121 122 $result = "\n".'<section id="results"><h2>Results</h2>'; 123 124 if($dec === false) { 125 $result .= "\n".'<p><span class="detected">⛔ Unverified ⛔</span></p>'; 126 } 127 else { 128 if(preg_match('/Expires (\d\d\ (January|February|March|April|May|June|July|August|September|October|November|December) \d\d\d\d)/i', $dec, $date)) { 129 $expiry_date = strtotime($date[1]); 130 if(strtotime("now") > $expiry_date){ 131 $result .= "\n".'<p><span class="detected">⛔ Expired ⛔</span></p>'; 132 }else{ 133 $result .= "\n".'<p><span class="detected">✅ Verified ✅</span></p>'; 134 $result .= "\n".'<pre>'.htmlentities($dec).'</pre>'; 135 } 136 }else{ 137 $result .= "\n".'<p><span class="detected">✅ Verified ✅</span></p>'; 138 $result .= "\n".'<pre>'.htmlentities($dec).'</pre>'; 139 } 140 } 141 142 $result .= "\n</section>"; 143 144 } 145 else { 146 $payload = ''; 147 $result = null; 148 } 149 ?> 150 151 <!DOCTYPE html> 152 <html lang="en"> 153 <head> 154 <title>Verify Dasho</title> 155 <link rel="shortcut icon" href="https://cdn.onionz.dev/global/images/favicon.svg" /> 156 <meta property="og:title" content="Verify Dasho"> 157 <meta property="og:description" content="Verify Dasho"> 158 <meta charset="utf-8"> 159 <meta name="viewport" content="width=device-width, initial-scale=1"> 160 <style> 161 162 /* 163 * 164 * 𝗖 𝗢 𝗟 𝗢 𝗥 165 * v 1.7.0 166 * 167 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */ 168 169 :root { 170 171 /* General 172 * ─────────────────────────────────── */ 173 174 --oc-white: #ffffff; 175 --oc-white-rgb: 255, 255, 255; 176 --oc-black: #000000; 177 --oc-black-rgb: 0, 0, 0; 178 179 180 /* Gray 181 * ─────────────────────────────────── */ 182 183 --oc-gray-0: #f8f9fa; 184 --oc-gray-0-rgb: 248, 249, 250; 185 --oc-gray-1: #f1f3f5; 186 --oc-gray-1-rgb: 241, 243, 245; 187 --oc-gray-2: #e9ecef; 188 --oc-gray-2-rgb: 233, 236, 239; 189 --oc-gray-3: #dee2e6; 190 --oc-gray-3-rgb: 222, 226, 230; 191 --oc-gray-4: #ced4da; 192 --oc-gray-4-rgb: 206, 212, 218; 193 --oc-gray-5: #adb5bd; 194 --oc-gray-5-rgb: 173, 181, 189; 195 --oc-gray-6: #868e96; 196 --oc-gray-6-rgb: 134, 142, 150; 197 --oc-gray-7: #495057; 198 --oc-gray-7-rgb: 73, 80, 87; 199 --oc-gray-8: #343a40; 200 --oc-gray-8-rgb: 52, 58, 64; 201 --oc-gray-9: #212529; 202 --oc-gray-9-rgb: 33, 37, 41; 203 204 205 /* Red 206 * ─────────────────────────────────── */ 207 208 --oc-red-0: #fff5f5; 209 --oc-red-0-rgb: 255, 245, 245; 210 --oc-red-1: #ffe3e3; 211 --oc-red-1-rgb: 255, 227, 227; 212 --oc-red-2: #ffc9c9; 213 --oc-red-2-rgb: 255, 201, 201; 214 --oc-red-3: #ffa8a8; 215 --oc-red-3-rgb: 255, 168, 168; 216 --oc-red-4: #ff8787; 217 --oc-red-4-rgb: 255, 135, 135; 218 --oc-red-5: #ff6b6b; 219 --oc-red-5-rgb: 255, 107, 107; 220 --oc-red-6: #fa5252; 221 --oc-red-6-rgb: 250, 82, 82; 222 --oc-red-7: #f03e3e; 223 --oc-red-7-rgb: 240, 62, 62; 224 --oc-red-8: #e03131; 225 --oc-red-8-rgb: 224, 49, 49; 226 --oc-red-9: #c92a2a; 227 --oc-red-9-rgb: 201, 42, 42; 228 229 230 /* Pink 231 * ─────────────────────────────────── */ 232 233 --oc-pink-0: #fff0f6; 234 --oc-pink-0-rgb: 255, 240, 246; 235 --oc-pink-1: #ffdeeb; 236 --oc-pink-1-rgb: 255, 222, 235; 237 --oc-pink-2: #fcc2d7; 238 --oc-pink-2-rgb: 252, 194, 215; 239 --oc-pink-3: #faa2c1; 240 --oc-pink-3-rgb: 250, 162, 193; 241 --oc-pink-4: #f783ac; 242 --oc-pink-4-rgb: 247, 131, 172; 243 --oc-pink-5: #f06595; 244 --oc-pink-5-rgb: 240, 101, 149; 245 --oc-pink-6: #e64980; 246 --oc-pink-6-rgb: 230, 73, 128; 247 --oc-pink-7: #d6336c; 248 --oc-pink-7-rgb: 214, 51, 108; 249 --oc-pink-8: #c2255c; 250 --oc-pink-8-rgb: 194, 37, 92; 251 --oc-pink-9: #a61e4d; 252 --oc-pink-9-rgb: 166, 30, 77; 253 254 255 /* Grape 256 * ─────────────────────────────────── */ 257 258 --oc-grape-0: #f8f0fc; 259 --oc-grape-0-rgb: 248, 240, 252; 260 --oc-grape-1: #f3d9fa; 261 --oc-grape-1-rgb: 243, 217, 250; 262 --oc-grape-2: #eebefa; 263 --oc-grape-2-rgb: 238, 190, 250; 264 --oc-grape-3: #e599f7; 265 --oc-grape-3-rgb: 229, 153, 247; 266 --oc-grape-4: #da77f2; 267 --oc-grape-4-rgb: 218, 119, 242; 268 --oc-grape-5: #cc5de8; 269 --oc-grape-5-rgb: 204, 93, 232; 270 --oc-grape-6: #be4bdb; 271 --oc-grape-6-rgb: 190, 75, 219; 272 --oc-grape-7: #ae3ec9; 273 --oc-grape-7-rgb: 174, 62, 201; 274 --oc-grape-8: #9c36b5; 275 --oc-grape-8-rgb: 156, 54, 181; 276 --oc-grape-9: #862e9c; 277 --oc-grape-9-rgb: 134, 46, 156; 278 279 280 /* Violet 281 * ─────────────────────────────────── */ 282 283 --oc-violet-0: #f3f0ff; 284 --oc-violet-0-rgb: 243, 240, 255; 285 --oc-violet-1: #e5dbff; 286 --oc-violet-1-rgb: 229, 219, 255; 287 --oc-violet-2: #d0bfff; 288 --oc-violet-2-rgb: 208, 191, 255; 289 --oc-violet-3: #b197fc; 290 --oc-violet-3-rgb: 177, 151, 252; 291 --oc-violet-4: #9775fa; 292 --oc-violet-4-rgb: 151, 117, 250; 293 --oc-violet-5: #845ef7; 294 --oc-violet-5-rgb: 132, 94, 247; 295 --oc-violet-6: #7950f2; 296 --oc-violet-6-rgb: 121, 80, 242; 297 --oc-violet-7: #7048e8; 298 --oc-violet-7-rgb: 112, 72, 232; 299 --oc-violet-8: #6741d9; 300 --oc-violet-8-rgb: 103, 65, 217; 301 --oc-violet-9: #5f3dc4; 302 --oc-violet-9-rgb: 95, 61, 196; 303 304 305 /* Indigo 306 * ─────────────────────────────────── */ 307 308 --oc-indigo-0: #edf2ff; 309 --oc-indigo-0-rgb: 237, 242, 255; 310 --oc-indigo-1: #dbe4ff; 311 --oc-indigo-1-rgb: 219, 228, 255; 312 --oc-indigo-2: #bac8ff; 313 --oc-indigo-2-rgb: 186, 200, 255; 314 --oc-indigo-3: #91a7ff; 315 --oc-indigo-3-rgb: 145, 167, 255; 316 --oc-indigo-4: #748ffc; 317 --oc-indigo-4-rgb: 116, 143, 252; 318 --oc-indigo-5: #5c7cfa; 319 --oc-indigo-5-rgb: 92, 124, 250; 320 --oc-indigo-6: #4c6ef5; 321 --oc-indigo-6-rgb: 76, 110, 245; 322 --oc-indigo-7: #4263eb; 323 --oc-indigo-7-rgb: 66, 99, 235; 324 --oc-indigo-8: #3b5bdb; 325 --oc-indigo-8-rgb: 59, 91, 219; 326 --oc-indigo-9: #364fc7; 327 --oc-indigo-9-rgb: 54, 79, 199; 328 329 330 /* Blue 331 * ─────────────────────────────────── */ 332 333 --oc-blue-0: #e7f5ff; 334 --oc-blue-0-rgb: 231, 245, 255; 335 --oc-blue-1: #d0ebff; 336 --oc-blue-1-rgb: 208, 235, 255; 337 --oc-blue-2: #a5d8ff; 338 --oc-blue-2-rgb: 165, 216, 255; 339 --oc-blue-3: #74c0fc; 340 --oc-blue-3-rgb: 116, 192, 252; 341 --oc-blue-4: #4dabf7; 342 --oc-blue-4-rgb: 77, 171, 247; 343 --oc-blue-5: #339af0; 344 --oc-blue-5-rgb: 51, 154, 240; 345 --oc-blue-6: #228be6; 346 --oc-blue-6-rgb: 34, 139, 230; 347 --oc-blue-7: #1c7ed6; 348 --oc-blue-7-rgb: 28, 126, 214; 349 --oc-blue-8: #1971c2; 350 --oc-blue-8-rgb: 25, 113, 194; 351 --oc-blue-9: #1864ab; 352 --oc-blue-9-rgb: 24, 100, 171; 353 354 355 /* Cyan 356 * ─────────────────────────────────── */ 357 358 --oc-cyan-0: #e3fafc; 359 --oc-cyan-0-rgb: 227, 250, 252; 360 --oc-cyan-1: #c5f6fa; 361 --oc-cyan-1-rgb: 197, 246, 250; 362 --oc-cyan-2: #99e9f2; 363 --oc-cyan-2-rgb: 153, 233, 242; 364 --oc-cyan-3: #66d9e8; 365 --oc-cyan-3-rgb: 102, 217, 232; 366 --oc-cyan-4: #3bc9db; 367 --oc-cyan-4-rgb: 59, 201, 219; 368 --oc-cyan-5: #22b8cf; 369 --oc-cyan-5-rgb: 34, 184, 207; 370 --oc-cyan-6: #15aabf; 371 --oc-cyan-6-rgb: 21, 170, 191; 372 --oc-cyan-7: #1098ad; 373 --oc-cyan-7-rgb: 16, 152, 173; 374 --oc-cyan-8: #0c8599; 375 --oc-cyan-8-rgb: 12, 133, 153; 376 --oc-cyan-9: #0b7285; 377 --oc-cyan-9-rgb: 11, 114, 133; 378 379 380 /* Teal 381 * ─────────────────────────────────── */ 382 383 --oc-teal-0: #e6fcf5; 384 --oc-teal-0-rgb: 230, 252, 245; 385 --oc-teal-1: #c3fae8; 386 --oc-teal-1-rgb: 195, 250, 232; 387 --oc-teal-2: #96f2d7; 388 --oc-teal-2-rgb: 150, 242, 215; 389 --oc-teal-3: #63e6be; 390 --oc-teal-3-rgb: 99, 230, 190; 391 --oc-teal-4: #38d9a9; 392 --oc-teal-4-rgb: 56, 217, 169; 393 --oc-teal-5: #20c997; 394 --oc-teal-5-rgb: 32, 201, 151; 395 --oc-teal-6: #12b886; 396 --oc-teal-6-rgb: 18, 184, 134; 397 --oc-teal-7: #0ca678; 398 --oc-teal-7-rgb: 12, 166, 120; 399 --oc-teal-8: #099268; 400 --oc-teal-8-rgb: 9, 146, 104; 401 --oc-teal-9: #087f5b; 402 --oc-teal-9-rgb: 8, 127, 91; 403 404 405 /* Green 406 * ─────────────────────────────────── */ 407 408 --oc-green-0: #ebfbee; 409 --oc-green-0-rgb: 235, 251, 238; 410 --oc-green-1: #d3f9d8; 411 --oc-green-1-rgb: 211, 249, 216; 412 --oc-green-2: #b2f2bb; 413 --oc-green-2-rgb: 178, 242, 187; 414 --oc-green-3: #8ce99a; 415 --oc-green-3-rgb: 140, 233, 154; 416 --oc-green-4: #69db7c; 417 --oc-green-4-rgb: 105, 219, 124; 418 --oc-green-5: #51cf66; 419 --oc-green-5-rgb: 81, 207, 102; 420 --oc-green-6: #40c057; 421 --oc-green-6-rgb: 64, 192, 87; 422 --oc-green-7: #37b24d; 423 --oc-green-7-rgb: 55, 178, 77; 424 --oc-green-8: #2f9e44; 425 --oc-green-8-rgb: 47, 158, 68; 426 --oc-green-9: #2b8a3e; 427 --oc-green-9-rgb: 43, 138, 62; 428 429 430 /* Lime 431 * ─────────────────────────────────── */ 432 433 --oc-lime-0: #f4fce3; 434 --oc-lime-0-rgb: 244, 252, 227; 435 --oc-lime-1: #e9fac8; 436 --oc-lime-1-rgb: 233, 250, 200; 437 --oc-lime-2: #d8f5a2; 438 --oc-lime-2-rgb: 216, 245, 162; 439 --oc-lime-3: #c0eb75; 440 --oc-lime-3-rgb: 192, 235, 117; 441 --oc-lime-4: #a9e34b; 442 --oc-lime-4-rgb: 169, 227, 75; 443 --oc-lime-5: #94d82d; 444 --oc-lime-5-rgb: 148, 216, 45; 445 --oc-lime-6: #82c91e; 446 --oc-lime-6-rgb: 130, 201, 30; 447 --oc-lime-7: #74b816; 448 --oc-lime-7-rgb: 116, 184, 22; 449 --oc-lime-8: #66a80f; 450 --oc-lime-8-rgb: 102, 168, 15; 451 --oc-lime-9: #5c940d; 452 --oc-lime-9-rgb: 92, 148, 13; 453 454 455 /* Yellow 456 * ─────────────────────────────────── */ 457 458 --oc-yellow-0: #fff9db; 459 --oc-yellow-0-rgb: 255, 249, 219; 460 --oc-yellow-1: #fff3bf; 461 --oc-yellow-1-rgb: 255, 243, 191; 462 --oc-yellow-2: #ffec99; 463 --oc-yellow-2-rgb: 255, 236, 153; 464 --oc-yellow-3: #ffe066; 465 --oc-yellow-3-rgb: 255, 224, 102; 466 --oc-yellow-4: #ffd43b; 467 --oc-yellow-4-rgb: 255, 212, 59; 468 --oc-yellow-5: #fcc419; 469 --oc-yellow-5-rgb: 252, 196, 25; 470 --oc-yellow-6: #fab005; 471 --oc-yellow-6-rgb: 250, 176, 5; 472 --oc-yellow-7: #f59f00; 473 --oc-yellow-7-rgb: 245, 159, 0; 474 --oc-yellow-8: #f08c00; 475 --oc-yellow-8-rgb: 240, 140, 0; 476 --oc-yellow-9: #e67700; 477 --oc-yellow-9-rgb: 230, 119, 0; 478 479 480 /* Orange 481 * ─────────────────────────────────── */ 482 483 --oc-orange-0: #fff4e6; 484 --oc-orange-0-rgb: 255, 244, 230; 485 --oc-orange-1: #ffe8cc; 486 --oc-orange-1-rgb: 255, 232, 204; 487 --oc-orange-2: #ffd8a8; 488 --oc-orange-2-rgb: 255, 216, 168; 489 --oc-orange-3: #ffc078; 490 --oc-orange-3-rgb: 255, 192, 120; 491 --oc-orange-4: #ffa94d; 492 --oc-orange-4-rgb: 255, 169, 77; 493 --oc-orange-5: #ff922b; 494 --oc-orange-5-rgb: 255, 146, 43; 495 --oc-orange-6: #fd7e14; 496 --oc-orange-6-rgb: 253, 126, 20; 497 --oc-orange-7: #f76707; 498 --oc-orange-7-rgb: 247, 103, 7; 499 --oc-orange-8: #e8590c; 500 --oc-orange-8-rgb: 232, 89, 12; 501 --oc-orange-9: #d9480f; 502 --oc-orange-9-rgb: 217, 72, 15; 503 504 } 505 506 /* Colors */ 507 508 :root { 509 --background: var(--oc-gray-9); 510 --background-secondary: var(--oc-gray-8); 511 --background-tertiary: var(--oc-gray-7); 512 --foreground: var(--oc-white); 513 --foreground-heavy: var(--oc-white); 514 } 515 516 *, *::before, *::after { 517 box-sizing: border-box; 518 } 519 520 a:link, a:visited, a:hover, a:active { 521 color: inherit !important; 522 } 523 524 html { 525 font-family: 'Inter', sans-serif; 526 font-feature-settings: "calt" 1; 527 font-size: 1.2em; 528 background: var(--background); 529 color: var(--foreground); 530 height: 100%; 531 } 532 533 * { 534 transition: background .1s; 535 } 536 537 body { 538 margin: 0; 539 padding: 0; 540 } 541 542 @supports (font-variation-settings: normal) { 543 html { 544 font-family: 'Inter var', sans-serif; 545 } 546 } 547 548 /* Type */ 549 550 .centered { 551 text-align: center; 552 } 553 554 /* Flexbox */ 555 556 .flex { 557 display: flex; 558 flex-wrap: wrap; 559 } 560 561 .box { 562 flex-grow: 1; 563 flex-basis: 15em; 564 margin: 0 .5em .5em 0; 565 } 566 567 .fit { 568 flex-basis: 1em; 569 } 570 571 .half { flex-basis: calc(50% - (.5em * 2)); } 572 .third { flex-basis: calc(33% - (.5em * 3)); } 573 .fourth { flex-basis: calc(25% - (.5em * 4)); } 574 .fifth { flex-basis: calc(20% - (.5em * 5)); } 575 576 .clickable:hover { 577 cursor: pointer; 578 } 579 580 main, header, footer { 581 display: block; 582 margin: auto; 583 padding: 0 2em; 584 max-width: 50em; 585 } 586 587 header nav { 588 margin: 1em 0 5em 0; 589 padding: 0; 590 background: var(--background); 591 font-size: 80%; 592 } 593 594 header nav .fa-long-arrow-alt-right { 595 padding: 0 .7em 0 .1em; 596 color: var(--foreground); 597 } 598 599 header, footer { 600 padding-top: 2em; 601 } 602 603 footer { 604 text-align: center; 605 padding-bottom: 3em; 606 } 607 608 footer small { 609 font-size: .8em; 610 } 611 612 footer small a { 613 text-decoration: none; 614 } 615 616 footer li a:link, footer li a:visited { 617 color: #333; 618 } 619 620 footer li a:hover, footer li a:active { 621 color: #555; 622 } 623 624 footer .fab { 625 font-size: 1.6em; 626 } 627 628 footer .site { 629 font-size: 80%; 630 margin: 1.5em 0 !important; 631 } 632 633 footer .site li { 634 padding-right: .5em; 635 } 636 637 footer .site li a { 638 text-decoration: none; 639 } 640 641 footer img { 642 width: 4em; 643 margin: 2em 0 1em 0; 644 } 645 646 /* Headings */ 647 648 h1, h2, h3, h4, h5, h6 { 649 margin: 2rem 0; 650 font-weight: 500; 651 color: var(--foreground-heavy); 652 } 653 654 h1 { 655 font-weight: 700; 656 } 657 658 section h2 { 659 margin: 1rem 0 2rem 0; 660 } 661 662 p, ul, li, div { 663 line-height: 160%; 664 } 665 666 ul.horizontal { 667 list-style-type: none; 668 margin: 0; 669 padding: 0; 670 } 671 672 ul.horizontal li { 673 display: inline; 674 } 675 676 .bulletless { 677 list-style-type: none; 678 margin: 0; 679 padding: 0; 680 } 681 682 hr { 683 border: 0; 684 height: 1px; 685 background: var(--foreground); 686 margin: 2em 0; 687 } 688 689 /* Sections */ 690 691 section { 692 border-left: .5em solid var(--background); 693 padding-left: 1em; 694 padding-top: .5em; 695 padding-bottom: .5em; 696 margin-left: -1.5em; 697 } 698 699 /* Blockquotes & Code */ 700 701 .code, pre, code, .monospace { 702 font-family: 'Fira Code'; 703 } 704 705 pre { 706 white-space: pre-wrap; 707 word-break: break-word; 708 } 709 710 /* Messages */ 711 712 .message { 713 display: flex; 714 color: var(--foreground); 715 margin: 1.5em 0; 716 width: 100%; 717 align-items: stretch; 718 align-content: stretch; 719 } 720 721 .message-icon { 722 background: var(--background-tertiary); 723 align-self: stretch; 724 padding: .5em; 725 border-top-left-radius: .2em; 726 border-bottom-left-radius: .2em; 727 } 728 729 .message-icon i { 730 font-size: 1.5em; 731 margin: .5em; 732 } 733 734 .message-text { 735 flex-basis: 100%; 736 margin: 0; 737 padding: 1.25em; 738 overflow: hidden; 739 background: var(--background-secondary); 740 align-self: stretch; 741 border-top-right-radius: .2em; 742 border-bottom-right-radius: .2em; 743 } 744 745 .confirmation .message-icon { background: var(--oc-green-5); color: var(--oc-black); } 746 .confirmation .message-text { background: var(--oc-green-3); color: var(--oc-black); } 747 748 .notice .message-icon { background: var(--oc-yellow-5); color: var(--oc-black); } 749 .notice .message-text { background: var(--oc-yellow-3); color: var(--oc-black); } 750 751 .warning .message-icon { background: var(--oc-orange-5); color: var(--oc-black); } 752 .warning .message-text { background: var(--oc-orange-3); color: var(--oc-black); } 753 754 .alert .message-icon { background: var(--oc-red-5); color: var(--oc-black); } 755 .alert .message-text { background: var(--oc-red-3); color: var(--oc-black); } 756 757 /* Nav */ 758 759 nav { 760 width: 100%; 761 padding: .5em 1em; 762 border-radius: 0.2em; 763 margin: 2em 0; 764 background: var(--background-secondary); 765 } 766 767 nav a:link, nav a:visited { 768 text-decoration: none; 769 } 770 771 nav a:hover, nav a:active { 772 text-decoration: none; 773 } 774 775 nav li { 776 margin-right: .5em; 777 } 778 779 .smaller { 780 font-size: 90%; 781 } 782 783 .even-smaller { 784 font-size: 80%; 785 } 786 787 .larger { 788 font-size: 120%; 789 } 790 791 .even-larger { 792 font-size: 130%; 793 } 794 795 .border-solid { 796 border: 1px solid #888; 797 border-radius: .2em; 798 } 799 800 .border-dashed { 801 border: 1px dashed #888; 802 border-radius: .2em; 803 } 804 805 .border-dotted { 806 border: 1px dotted #888; 807 border-radius: .2em; 808 } 809 810 /* Forms */ 811 812 .required:before { 813 content: "REQUIRED"; 814 font-size: 60%; 815 /*background: #e75757;*/ 816 color: #fff; 817 padding: .25em .5em; 818 border-radius: .25em; 819 margin: 0 0 0 .5em; 820 } 821 822 .form_note { 823 padding: .5em 1em; 824 margin-top: 2em; 825 border-radius: .2em; 826 } 827 828 fieldset { 829 margin: 1.5em 0; 830 padding: 1em; 831 border: 0; 832 background: var(--background-secondary); 833 color: var(--foreground); 834 border-radius: .2em; 835 } 836 837 legend { 838 padding: .7em 1em 2.5em .85em; 839 margin: 0 0 -2.5em -.85em; 840 font-weight: 700; 841 font-size: 120%; 842 background: var(--background-secondary); 843 color: var(--foereground); 844 border-radius: .2em; 845 } 846 847 input, button, select, option, textarea { 848 font-family: inherit; 849 font-size: inherit; 850 background: var(--background); 851 color: var(--foreground); 852 padding: .5em; 853 border-radius: .2em; 854 } 855 856 button, select, option { 857 cursor: pointer; 858 } 859 860 input, select, option, textarea { 861 border: 1px solid #999; 862 } 863 864 textarea { 865 width: 100%; 866 } 867 868 select { 869 -webkit-appearance: none; 870 } 871 872 label { 873 cursor: pointer; 874 display: block; 875 margin: 1em 0 .5em 0; 876 font-weight: normal; 877 } 878 879 .label { 880 cursor: pointer; 881 margin: .4em 0 .4em 0;; 882 } 883 884 .radio label, 885 .checkbox label { 886 display: inline; 887 margin: 0; 888 } 889 890 .group { 891 margin-bottom: 1em; 892 } 893 894 button, .button, input[type="submit"] { 895 border: 0; 896 padding: .5em 1em; 897 cursor: pointer; 898 border-radius: .2em; 899 background: var(--oc-blue-7); 900 color: var(--oc-white); 901 } 902 903 input[type="text"], input[type="password"], select { 904 width: 95%; 905 margin-bottom: .5em; 906 } 907 908 button:hover, 909 button:focus { 910 opacity: .85; 911 } 912 913 button:active { 914 transform: scale(0.97); 915 transition: transform 0.1s ease-in-out; 916 } 917 918 form { 919 width: 100%; 920 } 921 922 .form-reset { 923 margin: 0; 924 } 925 926 form aside { 927 margin: .2em 0 2em 0; 928 font-size: 80%; 929 } 930 931 aside { 932 float: right; 933 } 934 935 aside nav { 936 margin: 0 0 1em 1em; 937 padding: .3em .2em; 938 } 939 940 .heading-aligned { 941 margin-top: -4em; 942 } 943 944 /* Toggle Switch */ 945 946 .switch { 947 --line: #ccc; 948 --dot: var(--oc-violet-4); 949 --circle: var(--oc-yellow-3); 950 --background: #aaa; 951 --duration: .3s; 952 --text: #000; 953 --shadow: 0 1px 3px rgba(0, 9, 61, 0.08); 954 cursor: pointer; 955 position: relative; 956 } 957 .switch:before { 958 content: ''; 959 width: 60px; 960 height: 32px; 961 border-radius: 16px; 962 background: var(--background); 963 position: absolute; 964 left: 0; 965 top: 0; 966 box-shadow: var(--shadow); 967 } 968 .switch input { 969 display: none; 970 } 971 .switch input + div { 972 position: relative; 973 } 974 .switch input + div:before, .switch input + div:after { 975 --s: 1; 976 content: ''; 977 position: absolute; 978 height: 4px; 979 top: 14px; 980 width: 24px; 981 background: var(--line); 982 -webkit-transform: scaleX(var(--s)); 983 transform: scaleX(var(--s)); 984 -webkit-transition: -webkit-transform var(--duration) ease; 985 transition: -webkit-transform var(--duration) ease; 986 transition: transform var(--duration) ease; 987 transition: transform var(--duration) ease, -webkit-transform var(--duration) ease; 988 } 989 .switch input + div:before { 990 --s: 0; 991 left: 4px; 992 -webkit-transform-origin: 0 50%; 993 transform-origin: 0 50%; 994 border-radius: 2px 0 0 2px; 995 } 996 .switch input + div:after { 997 left: 32px; 998 -webkit-transform-origin: 100% 50%; 999 transform-origin: 100% 50%; 1000 border-radius: 0 2px 2px 0; 1001 } 1002 .switch input + div span { 1003 padding-left: 60px; 1004 line-height: 28px; 1005 color: var(--text); 1006 } 1007 .switch input + div span:before { 1008 --x: 0; 1009 --b: var(--circle); 1010 --s: 15px; 1011 content: ''; 1012 position: absolute; 1013 left: 4px; 1014 top: 4px; 1015 width: 24px; 1016 height: 24px; 1017 border-radius: 50%; 1018 box-shadow: inset 0 0 0 var(--s) var(--b); 1019 -webkit-transform: translateX(var(--x)); 1020 transform: translateX(var(--x)); 1021 -webkit-transition: box-shadow var(--duration) ease, -webkit-transform var(--duration) ease; 1022 transition: box-shadow var(--duration) ease, -webkit-transform var(--duration) ease; 1023 transition: box-shadow var(--duration) ease, transform var(--duration) ease; 1024 transition: box-shadow var(--duration) ease, transform var(--duration) ease, -webkit-transform var(--duration) ease; 1025 } 1026 .switch input + div span:not(:empty) { 1027 padding-left: 68px; 1028 } 1029 .switch input:checked + div:before { 1030 --s: 1; 1031 } 1032 .switch input:checked + div:after { 1033 --s: 0; 1034 } 1035 .switch input:checked + div span:before { 1036 --x: 28px; 1037 --s: 12px; 1038 --b: var(--dot); 1039 } 1040 1041 body .switch + .switch { 1042 margin-top: 32px; 1043 } 1044 1045 /* Checkboxes */ 1046 1047 input[type=checkbox] { display: none; } 1048 input[type=checkbox] + label:before { 1049 font-family: 'Font Awesome 6 Pro'; 1050 display: inline-block; 1051 width: 1.3em; 1052 } 1053 input[type=checkbox] + label:before { content: "\f0c8"; } 1054 input[type=checkbox]:checked + label:before { content: "\f14a"; } 1055 1056 /* Radio Buttons */ 1057 1058 input[type=radio] { display: none; } 1059 input[type=radio] + label:before { 1060 font-family: 'Font Awesome 6 Pro'; 1061 display: inline-block; 1062 width: 1.3em; 1063 } 1064 input[type=radio] + label:before { content: "\f111"; } 1065 input[type=radio]:checked + label:before { content: "\f192"; } 1066 1067 /* Tables */ 1068 1069 .table-container { 1070 overflow-x: auto; 1071 } 1072 1073 table { 1074 border-collapse: collapse; 1075 width: 100%; 1076 } 1077 1078 th, td { 1079 background: var(--background); 1080 padding: .5em; 1081 } 1082 1083 th { 1084 border-bottom: 1px solid var(--foreground); 1085 background: var(--background-secondary); 1086 } 1087 1088 tr:nth-child(even) td { 1089 background: var(--background-secondary); 1090 } 1091 1092 th:first-child { border-top-left-radius: 0.2em; } 1093 th:last-child { border-top-right-radius: 0.2em; } 1094 tr:last-child td:first-child { border-bottom-left-radius: 0.2em; } 1095 tr:last-child td:last-child { border-bottom-right-radius: 0.2em; } 1096 1097 ::selection { 1098 color: var(--background); 1099 background: var(--foreground); 1100 } 1101 1102 @media (max-width: 900px) { 1103 html { 1104 font-size: 1.05em; 1105 } 1106 main, header, footer { 1107 padding: 0 1.5em; 1108 } 1109 header { 1110 padding-top: 2em; 1111 } 1112 header nav { 1113 margin: .5 0 3em 0; 1114 } 1115 footer { 1116 padding-top: 2em; 1117 padding-bottom: 3em; 1118 } 1119 } 1120 1121 @media (max-width: 500px) { 1122 html { 1123 font-size: 1em; 1124 } 1125 main, header, footer { 1126 padding: 0 1em; 1127 } 1128 header { 1129 padding-top: 2em; 1130 } 1131 header nav { 1132 margin: 0 0 2em 0; 1133 } 1134 footer { 1135 padding-top: 2em; 1136 padding-bottom: 3em; 1137 } 1138 } 1139 1140 body { 1141 font-family: sans-serif; 1142 } 1143 main { 1144 margin: auto; 1145 max-width: 50em; 1146 line-height: 1.5em; 1147 } 1148 input, textarea { 1149 display: block; 1150 width: 100%; 1151 } 1152 pre { 1153 font-family: Courier, monospace; 1154 font-size: 14px; 1155 white-space: pre-wrap; 1156 white-space: -moz-pre-wrap; 1157 white-space: -pre-wrap; 1158 white-space: -o-pre-wrap; 1159 word-wrap: break-word; 1160 } 1161 </style> 1162 </head> 1163 <body> 1164 1165 <header> 1166 1167 <h1>Verify Dasho</h1> 1168 </header> 1169 1170 <main> 1171 1172 <p>This is the easiest way to verify Dasho's identity. It uses <a href="https://nacl.cr.yp.to">NaCl</a> for encryption and <a href="http://base91.sourceforge.net">basE91</a> for portability. Payloads can only be created by Dasho, the owner of this service, the dasho.dev domain, and the d_a_s_h_o account on Keybase. By being able to provide a payload which can be verified here, you know that it comes from Dasho. Some payloads have expiry dates, and will need to be renewed. Always check to see if a payload has an expiry date, and when that expiry date is upon verification.</p> 1173 1174 <form action="#results" method="post"> 1175 <fieldset> 1176 <legend>Verify</legend> 1177 <p>Provide a payload below to verify Dasho's identity.</p> 1178 <p> 1179 <label for="payload">Payload</label> 1180 <textarea name="payload" id="payload"><?php echo $payload; ?></textarea> 1181 </p> 1182 <input type="submit" value="Go"> 1183 </fieldset> 1184 </form> 1185 1186 1187 <?php 1188 1189 echo $result; 1190 1191 ?> 1192 1193 </main> 1194 1195 <footer> 1196 1197 <ul class="horizontal site"> 1198 <li>© Dasho</li> 1199 </ul> 1200 1201 </footer> 1202 1203 </body> 1204 </html>