1.0, should be good to go now

This commit is contained in:
quoije
2022-03-02 23:02:00 -05:00
parent 88a0c96790
commit 6ed612a2b3
11 changed files with 155 additions and 89 deletions
+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>
+62 -53
View File
@@ -1,7 +1,33 @@
<!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);
<head>
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">
<title>Le pain bleu</title>
@@ -13,8 +39,8 @@
<script src="mmn.js"></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>
</head>
<body style="background:linear-gradient(rgba(47, 23, 15, 0.65), rgba(47, 23, 15, 0.65)), url('../assets/img/bg.jpg');">
</head>
<body style="background:linear-gradient(rgba(47, 23, 15, 0.65), rgba(47, 23, 15, 0.65)), url('../assets/img/bg.jpg');">
<h1 class="text-center text-white d-none d-lg-block site-heading"><span class="site-heading-lower"><span class="site-heading-lower">LE PAIN BLEU<span class="text-primary site-heading-upper mb-3" style="margin-top: 6px;">SEULEMENT BLEU&nbsp;&nbsp;<img src="../assets/img/Logo%20Projet%20Fina_oofl.png" width="125"></span></span></span></h1>
<nav class="navbar navbar-dark navbar-expand-lg bg-dark py-lg-4" id="mainNav" style="margin-top: 0px;">
<div class="container"><a class="navbar-brand text-uppercase d-lg-none text-expanded" href="#" style="color: rgb(86,144,230);">Le pain bleu</a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navbarResponsive"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
@@ -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>
@@ -92,6 +84,23 @@
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</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();
?>
</html>
+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
+3 -3
View File
@@ -1,11 +1,11 @@
<?php
$servername = "127.0.0.1";
$servername = "database";
$username = "admin";
$password = "Lepainbleu123!";
$password = "l[k8]ww(/mwHfO.*";
$dbname = "web";
$conn = new mysqli($servername,$username ,$password,$dbname);
$conn = new mysqli($servername,$username,$password,$dbname);
// Check connection
if ($conn -> connect_errno) {
+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';
}
+1 -6
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');">