Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RUN apt-get install -y \
php-mysql \
php-odbc \
php-phpdbg \
php-gd \
php-sqlite3
RUN apt-get install apache2 libapache2-mod-php -y
RUN apt-get install mariadb-common mariadb-server mariadb-client -y
Expand Down
8 changes: 8 additions & 0 deletions app/lab/captcha-bypass/captcha-bypass1/en.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title="Captcha Bypass"
message="Send Us Your Message"
name="Name-Surname"
sendmessage="Forward Message"
captcha="Captcha"
submit="Send"
basarili="Congratulations, verification successful!"
basarisiz="Verification failed, you are late."
8 changes: 8 additions & 0 deletions app/lab/captcha-bypass/captcha-bypass1/fr.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title="Captcha Bypass"
message="Envoyez-nous Votre Message"
name="Prénom - nom de famille"
sendmessage="Transférer le mMessage"
captcha="Captcha"
submit="Envoyer"
basarili="Félicitations, vérification réussie !"
basarisiz="La vérification a échoué, vous êtes en retard"
94 changes: 94 additions & 0 deletions app/lab/captcha-bypass/captcha-bypass1/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php
require("../../../lang/lang.php");
$strings = tr();

session_start();

$message = '';

$num1 = rand(1, 10);
$num2 = rand(1, 10);
$sum = $num1 + $num2;

if ($_SERVER["REQUEST_METHOD"] == "POST") {
$captchaAnswer = $_POST['captcha'];
$num1_posted = $_POST['num1'];
$num2_posted = $_POST['num2'];
$time_loaded = $_SESSION['time_loaded'];

$time_now = time();
$time_diff = $time_now - $time_loaded;

if ($time_diff < 3 && $captchaAnswer == ($num1_posted + $num2_posted)) {
$message = "basarili";
} else {
$message = "basarisiz";
$num1 = rand(1, 10);
$num2 = rand(1, 10);
$sum = $num1 + $num2;
}
}

$imageText = "$num1 + $num2 = ?";
$image = imagecreatetruecolor(120, 40);
$bgColor = imagecolorallocate($image, 255, 255, 255);
$textColor = imagecolorallocate($image, 0, 0, 0);
imagefilledrectangle($image, 0, 0, 120, 40, $bgColor);
imagestring($image, 5, 10, 12, $imageText, $textColor);

ob_start();
imagepng($image);
$imageData = ob_get_clean();
imagedestroy($image);
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<title>Captcha Bypass</title>
<style>
body {
align-items: center;
justify-content: center;
height: 100vh;
background-color: #f8f9fa;
}
.login-form {
display: flex;
flex-direction: column;
max-width: 400px;
width: 100%;
margin: auto;
}
</style>
</head>
<body>
<div class="login-form">
<h2 class="text-center mb-4"><?php echo $strings['message']; ?></h2>
<form method="post">
<div class="form-group">
<label for="username"><?php echo $strings['name']; ?></label>
<input type="text" class="form-control" id="username" name="username" placeholder="..." required>
</div>
<div class="form-group">
<label for="customMessage"><?php echo $strings['sendmessage']; ?></label>
<textarea class="form-control col" id="customMessage" name="customMessage" rows="3" placeholder="..." required></textarea>
</div>
<div class="form-group">
<label for="captcha"><?php echo $strings['captcha']; ?> <br></label>
<img src="data:image/png;base64,<?php echo base64_encode($imageData); ?>" alt="Captcha Image"><br><br>
<input type="hidden" name="num1" value="<?php echo $num1; ?>">
<input type="hidden" name="num2" value="<?php echo $num2; ?>">
<?php $_SESSION['time_loaded'] = time(); ?>
<input type="text" class="form-control" id="captcha" name="captcha">
</div>
<button type="submit" class="btn btn-primary btn-block"><?php echo $strings['submit']; ?></button>
<p class="mt-3"><?php echo $strings[$message]; ?></p>
</form>
</div>
<script id="VLBar" title="<?= $strings["title"]; ?>" category-id="13" src="/public/assets/js/vlnav.min.js"></script>
</body>
</html>
8 changes: 8 additions & 0 deletions app/lab/captcha-bypass/captcha-bypass1/tr.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title="Captcha Bypass"
message="Mesajınızı Bize İletin"
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, geç kaldın."
Loading