From 116a53158423bcb011d43a58fe7209ffc74a68c7 Mon Sep 17 00:00:00 2001 From: David Polakovic Date: Sun, 11 May 2025 19:53:00 +0200 Subject: [PATCH] final touches on dead drop... --- dead-drop.php | 11 +++------ php/captcha.php | 4 +++- php/dd2.php | 60 ++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/dead-drop.php b/dead-drop.php index 628dfe1..b291c29 100755 --- a/dead-drop.php +++ b/dead-drop.php @@ -48,17 +48,12 @@ message in a dead drop, it will be hidden from anyone who doesn't know its location. It also uses SHA-256 hashing and AES-256-CBC encryption to keep it hidden from the hosting provider and webmaster as well. Enter the coordinates of a dead drop to check if it's hot (has stashed message) - or if it's cold (empty). - -


+ or if it's cold (empty).


-

- -
+

-

-
+

diff --git a/php/captcha.php b/php/captcha.php index 213d1c6..33b9e77 100644 --- a/php/captcha.php +++ b/php/captcha.php @@ -7,9 +7,10 @@ function captcha($token, $w3w) { if (isset($_SESSION['captcha']) && $userInput === $_SESSION['captcha']) { return 'YAY'; } - echo "Wrong captcha. Try again.
"; + echo "

Wrong captcha. Try again.

"; } + echo "
"; echo "
"; echo ""; echo ""; @@ -17,6 +18,7 @@ function captcha($token, $w3w) { echo "
"; echo ""; echo "
"; + echo "


"; return null; } diff --git a/php/dd2.php b/php/dd2.php index ab15d45..44c2239 100644 --- a/php/dd2.php +++ b/php/dd2.php @@ -1,14 +1,18 @@ DROP_LIMIT) { - echo "There is too much heat on this domain right now to stash a new message. Come back later."; + echo "
There is too much heat on this domain right now to stash a new message. Come back later.
"; return; } $slowDown = checkDropRate(); if ($slowDown) { if (captcha($token, $result['w3w']) !== 'YAY') return; } - echo "

" . htmlentities($result['w3w']) ."

This drop is cold. You can stash your message here.

"; + echo "

" . htmlentities($result['w3w']) ."

This drop is cold. You can stash your message here.


"; echo <<

+

+ HTML; return; } @@ -92,6 +100,7 @@ HTML; if ($result['mode'] === 'initial' || ($result['mode'] === 'readonly' && $result['status'] === 'invalid')) { echo <<
@@ -99,24 +108,49 @@ HTML;
+ +

+

+$text_bottom HTML; } if ($result['mode'] === 'readonly') { if ($result['status'] === 'hot') { - echo "
" . htmlspecialchars($result['decrypted'], ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . "
"; - echo <<
" . htmlspecialchars($result['decrypted'], ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . "
"; + echo <<
-
+

+ + HTML; } elseif ($result['status'] === 'invalid') { - echo "
{$result['message']}"; + echo "

{$result['message']}
"; } } elseif ($result['mode'] === 'stashed') { - echo "

Message stashed at " . htmlentities($result['w3w']) ."

Your dead drop is hot."; + echo "

Message stashed at " . htmlentities($result['w3w']) ."

Your dead drop is hot.


"; } } -- 2.30.2