Compare commits

5 Commits
Author SHA1 Message Date
quoije feebceffaa update 2026-09-15 17:49:09 -04:00
quoije 6ed612a2b3 1.0, should be good to go now 2022-03-02 23:02:00 -05:00
quoije 88a0c96790 add password type to pass input 2022-03-01 09:25:22 -05:00
Mathieu Moran c601b7e9a1 Merge pull request #1 from quoije/dev
Dev
2022-02-28 00:55:12 -05:00
Mathieu Moran 0dcce8f75c Update README.md
very important commit
2022-02-27 20:22:19 -05:00
24 changed files with 182 additions and 94 deletions
Regular → Executable
+22
View File
@@ -1 +1,23 @@
# web_lepainbleu.ca
blue bread is best bread.
![Screenshot](assets/img/screenshot.png)
## Pages
- `index.html` — accueil
- `products.html` — produits
- `about.html` — à propos
- `login.html` — espace client
- `https://boutique.lepainbleu.ca` — boutique en ligne
## API
Le dossier `api/` contient les scripts backend (`client.php`, `db.php`, `yeet.php`, `mmn.js`).
## Stack
- HTML / CSS / PHP
- Bootstrap 5
- Fonts : Raleway, Lora
Regular → Executable
+2
View File
@@ -36,6 +36,8 @@
<h2 class="section-heading mb-4"><span class="section-heading-upper">le pain dans seulement une couleur</span><span class="section-heading-lower">bleu</span></h2>
<p>Fondé en 1987 par les frères Hernandez, notre établissement sert du pain bleu riche provenant d'agriculteurs artisanaux de diverses régions d'Amérique du Sud et d'Amérique centrale. Nous nous engageons à parcourir le monde, à trouver le meilleur pain bleu et à vous ramener ici dans notre boutique de pain bleue.<br></p>
<p class="mb-0">Nous vous garantissons que vous tomberez dans la convoitise avec nos mélanges décadents au moment où vous entrerez jusqu'à ce que vous ayez terminé votre dernière bouchée de pain bleu. Rejoignez-nous pour votre routine quotidienne, une sortie entre amis, ou tout simplement pour profiter d'un moment seul entre pains bleus.<br></p>
<p class="mb-0"><br>Pour toute autre questions, vous pouvez rejoindre notre vendeur étoile Allain Dex au numéro suivant:<br></p><p><b>514-765-9295</b> Ext:1001
</p>
</div>
</div>
</div>
Regular → Executable
+57 -48
View File
@@ -1,6 +1,32 @@
<!DOCTYPE html>
<html>
<?php
include 'db.php';
if (isset($_COOKIE['pass'])) {
$dog = $_COOKIE["user"];
$cat = $_COOKIE["pass"];
}
$thelist = '';
if ($handle = opendir("./client_files/")) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$thelist .= '<li><a href="client_files/'.$file.'">'.$file.'</a></li>';
}
}
closedir($handle);
}
$dog;
$cat;
$user_sql = "SELECT user FROM users where user LIKE '". $dog ."'";
$pass_sql = "SELECT pass FROM users where user LIKE '". $dog ."'";
$rus = mysqli_query($conn, $user_sql);
$rps = mysqli_query($conn, $pass_sql);
if ($rus->num_rows > 0) {
while($row = $rps->fetch_assoc()) {
if ($cat == $row["pass"])
{
echo <<<GFG
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
@@ -22,65 +48,31 @@
<ul class="navbar-nav mx-auto">
<li class="nav-item"><a class="nav-link" href="../index.html">Accueil</a></li>
<li class="nav-item"><a class="nav-link" href="../products.html">produits</a></li>
<li class="nav-item"><a class="nav-link" href="../https://nop.lepainbleu.ca">boutique</a></li>
<li class="nav-item"><a class="nav-link" href="https://boutique.lepainbleu.ca">boutique</a></li>
<li class="nav-item"><a class="nav-link" href="../login.html">espace client</a></li>
<li class="nav-item"><a class="nav-link" href="../about.html">à propos</a></li>
</ul>
</div>
</div>
</nav>
<?php
include 'db.php';
$dog = $_COOKIE["user"];
$cat = $_COOKIE["pass"];
$user_sql = "SELECT user FROM users where user LIKE '". $dog ."'";
$pass_sql = "SELECT pass FROM users where user LIKE '". $dog ."'";
$rus = mysqli_query($conn, $user_sql);
$rps = mysqli_query($conn, $pass_sql);
if ($rus->num_rows > 0) {
while($row = $rps->fetch_assoc()) {
if ($cat == $row["pass"])
{
}
else
{
echo $cat;
echo "_____ IN BETWEEN _____";
echo $row["pass"];
die("DENIED");
}
}
} else {
echo "no result :(";
}
$conn->close();
?>
<section class="page-section cta">
<center>
<form action="javascript:deleteCookies('user');javascript:deleteCookies('pass')">
<input type="submit" value="Se déconnecter">
</form>
</center>
<br>
<div class="container">
<div class="row">
<div class="col-xl-9 mx-auto">
<div class="cta-inner rounded">
<nav class="navbar navbar-default">
<ul>
<li><a href="https://docs.nopcommerce.com/en/running-your-store/catalog/index.html">Procédure utilisateur</a></li>
<li><a href="https://theuselessweb.com/">Sites web?</a></li>
</ul>
</nav>
<br>
<?php
$thelist = '';
if ($handle = opendir("./client_files/")) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$thelist .= '<li><a href="client_files/'.$file.'">'.$file.'</a></li>';
}
}
closedir($handle);
}
?>
<a href="https://docs.nopcommerce.com/en/running-your-store/catalog/index.html">Procédure utilisateur</a>
<p>
<h3>Fichiers:</h3>
<ul><?php echo $thelist; ?></ul>
<ul>
$thelist
</ul>
</p>
</div>
</div>
</div>
@@ -95,3 +87,20 @@
</body>
</html>
GFG;
}
else
{
echo "YOU DONT BELONG HERE YOU BLUE BREAD EATER";
die("DENIED");
}
}
} else {
echo "you shall not pass at this time, sorry :(";
}
$conn->close();
?>
+4
View File
@@ -0,0 +1,4 @@
admin:password123
woof:miaw
ez:clap
slayer:rainingblood
View File
View File
View File
+4
View File
@@ -0,0 +1,4 @@
oof
10/10
Regular → Executable
+4 -4
View File
@@ -1,9 +1,9 @@
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "";
$dbname = "oof";
$servername = "database";
$username = "admin";
$password = "l[k8]ww(/mwHfO.*";
$dbname = "web";
$conn = new mysqli($servername,$username,$password,$dbname);
Regular → Executable
+52
View File
@@ -1,5 +1,19 @@
var str = "Aucun pain bleu ici, malheureusement. keep looking tho, may find something.";
console.log(str);
console.log(getCookie("user"));
console.log(getCookie("pass"));
function redirect() {
if (getCookie("user") !== null && getCookie("pass") !== null)
{
console.log("Redirect oof");
window.location = "./api/client.php";
}
else
{
console.log("nope");
}
}
function chkLogin(woof, miaw) {
$.post( "./api/yeet.php", { dog: woof, cat: miaw }, function(data) {
@@ -15,4 +29,42 @@ function chkLogin(woof, miaw) {
});
}
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
else return null;
}
function setCookie(name, value, options = {}) {
options = {
path: '/',
// add other defaults here if necessary
...options
};
if (options.expires instanceof Date) {
options.expires = options.expires.toUTCString();
}
let updatedCookie = encodeURIComponent(name) + "=" + encodeURIComponent(value);
for (let optionKey in options) {
updatedCookie += "; " + optionKey;
let optionValue = options[optionKey];
if (optionValue !== true) {
updatedCookie += "=" + optionValue;
}
}
document.cookie = updatedCookie;
}
function deleteCookies(name) {
console.log("no more cookies");
setCookie(name, "", {
'max-age': -1
})
window.location = '../index.html';
}
Regular → Executable
View File
Vendored Regular → Executable
View File
View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 345 KiB

After

Width:  |  Height:  |  Size: 345 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 382 KiB

After

Width:  |  Height:  |  Size: 382 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 359 KiB

After

Width:  |  Height:  |  Size: 359 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 407 KiB

After

Width:  |  Height:  |  Size: 407 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Regular → Executable
View File
Regular → Executable
+2 -7
View File
@@ -11,14 +11,9 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,400i,700,700i">
<script src="./api/mmn.js"></script>
<script>redirect()</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
<script>
if (document.cookie)
{
window.location = 'api/client.php';
}
</script>
</head>
<body style="background:linear-gradient(rgba(47, 23, 15, 0.65), rgba(47, 23, 15, 0.65)), url('assets/img/bg.jpg');">
@@ -43,7 +38,7 @@
<div class="text-center cta-inner rounded">
<form action="javascript:chkLogin($('#nomd').val(),$('#mdp').val())">
<input type="text" id="nomd" placeholder="nom d'utilisateur">
<input type="text" id="mdp" placeholder="mot de passe">
<input type="password" id="mdp" placeholder="mot de passe">
<input type="submit" value=">">
</form>
<br>
Regular → Executable
View File