From 81a0b757676af51bf5b5c7aad86952430256503f Mon Sep 17 00:00:00 2001 From: MetehanGulduren Date: Wed, 13 Mar 2024 21:51:21 +0300 Subject: [PATCH] update --- app/lab/captcha-bypass/bypass/en.ini | 10 +-- app/lab/captcha-bypass/bypass/fr.ini | 10 +-- app/lab/captcha-bypass/bypass/index.php | 29 +++++--- app/lab/captcha-bypass/bypass/tr.ini | 10 +-- .../captcha-bypass/bypass/view_messages.php | 68 +++++++++++++++++++ app/lab/captcha-bypass/bypass1/index.php | 2 +- 6 files changed, 105 insertions(+), 24 deletions(-) create mode 100644 app/lab/captcha-bypass/bypass/view_messages.php diff --git a/app/lab/captcha-bypass/bypass/en.ini b/app/lab/captcha-bypass/bypass/en.ini index 2470fe6..5d7c413 100644 --- a/app/lab/captcha-bypass/bypass/en.ini +++ b/app/lab/captcha-bypass/bypass/en.ini @@ -5,7 +5,9 @@ name="Name-Surname" sendmessage="Forward Message" captcha="Captcha" submit="Send" -basarili="Congratulations, verification successful!" -basarisiz="Verification failed." -yenile='Refresh' -empty='Please enter a value.' \ No newline at end of file +successful="Congratulations, verification successful!" +unsuccessful="Verification failed." +refresh='Refresh' +empty='Please enter a value.' +view_messages='View Messages' +message1='Messages' \ No newline at end of file diff --git a/app/lab/captcha-bypass/bypass/fr.ini b/app/lab/captcha-bypass/bypass/fr.ini index 5361361..3b45738 100644 --- a/app/lab/captcha-bypass/bypass/fr.ini +++ b/app/lab/captcha-bypass/bypass/fr.ini @@ -5,7 +5,9 @@ name="Prénom - nom de famille" sendmessage="Transférer le mMessage" captcha="Captcha" submit="Envoyer" -basarili="Félicitations, vérification réussie !" -basarisiz="Échec de la vérification." -yenile='Rafraîchir' -empty='Veuillez entrer une valeur.' \ No newline at end of file +successful="Félicitations, vérification réussie !" +unsuccessful="Échec de la vérification." +refresh='Rafraîchir' +empty='Veuillez entrer une valeur.' +view_messages='Afficher les messages' +message1='Messages' \ No newline at end of file diff --git a/app/lab/captcha-bypass/bypass/index.php b/app/lab/captcha-bypass/bypass/index.php index 863c74b..393f75b 100644 --- a/app/lab/captcha-bypass/bypass/index.php +++ b/app/lab/captcha-bypass/bypass/index.php @@ -46,19 +46,25 @@ function generateCaptchaImage($num1, $num2) if (isset($num1_posted, $num2_posted)) { $captchaSonuc = $captchaAnswer == ($num1_posted + $num2_posted); - $message = $captchaSonuc ? "basarili" : "basarisiz"; + $message = $captchaSonuc ? "successful" : "unsuccessful"; if ($captchaSonuc) { $httpStatus = 200; $_SESSION['num1'] = rand(1, 10); $_SESSION['num2'] = rand(1, 10); + + $username = isset($_POST['username']) ? htmlspecialchars($_POST['username']) : ''; + $customMessage = isset($_POST['customMessage']) ? htmlspecialchars($_POST['customMessage']) : ''; + + $submittedMessage = "$username, $customMessage"; + $_SESSION['messages'][] = $submittedMessage; } else { $httpStatus = 400; $_SESSION['num1'] = $oncekiNum1; $_SESSION['num2'] = $oncekiNum2; } } else { - $message = $strings['basarisiz']; + $message = $strings['unsuccessful']; } } @@ -107,12 +113,12 @@ function generateCaptchaImage($num1, $num2) -
"> +
">
Captcha Resmi
- +

@@ -120,11 +126,12 @@ function generateCaptchaImage($num1, $num2)
+ ' . $strings['basarili'] . '

'; - } elseif ($message === "basarisiz") { - echo '

' . $strings['basarisiz'] . '

'; + if ($message === "successful") { + echo '

' . $strings['successful'] . '

'; + } elseif ($message === "unsuccessful") { + echo '

' . $strings['unsuccessful'] . '

'; } ?> @@ -188,7 +195,7 @@ function validateForm() { document.addEventListener('DOMContentLoaded', function () { - + refreshCaptcha(); @@ -202,8 +209,8 @@ function validateForm() { var errorMessageElement = document.getElementById('error-message'); var message = ''; - if (message === 'basarisiz' && errorMessageElement) { - errorMessageElement.innerHTML = ''; + if (message === 'unsuccessful' && errorMessageElement) { + errorMessageElement.innerHTML = ''; } }); diff --git a/app/lab/captcha-bypass/bypass/tr.ini b/app/lab/captcha-bypass/bypass/tr.ini index 0b9e970..01b681d 100644 --- a/app/lab/captcha-bypass/bypass/tr.ini +++ b/app/lab/captcha-bypass/bypass/tr.ini @@ -5,7 +5,9 @@ name="Ad-Soyad" sendmessage="Mesaj İlet" captcha="Captcha" submit="Gönder" -basarili="Tebrikler, doğrulama başarılı!" -basarisiz="Doğrulama başarısız." -yenile='Yenile' -empty='Lütfen bir değer girin.' \ No newline at end of file +successful="Tebrikler, doğrulama başarılı!" +unsuccessful="Doğrulama başarısız." +refresh='Yenile' +empty='Lütfen bir değer girin.' +view_messages='Mesajları Görüntüle' +message1='Mesajlar' \ No newline at end of file diff --git a/app/lab/captcha-bypass/bypass/view_messages.php b/app/lab/captcha-bypass/bypass/view_messages.php new file mode 100644 index 0000000..016a863 --- /dev/null +++ b/app/lab/captcha-bypass/bypass/view_messages.php @@ -0,0 +1,68 @@ + + + + + + + + + + <?= $strings['title']; ?> + + + +
+

+ + + + + + + + + + + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/app/lab/captcha-bypass/bypass1/index.php b/app/lab/captcha-bypass/bypass1/index.php index e06891b..9d37638 100644 --- a/app/lab/captcha-bypass/bypass1/index.php +++ b/app/lab/captcha-bypass/bypass1/index.php @@ -267,4 +267,4 @@ function generateCaptcha($width, $height, $length = 6) - \ No newline at end of file + \ No newline at end of file