From b5000109350d248003375381eaa2d25f7985e8c0 Mon Sep 17 00:00:00 2001 From: quoije Date: Sun, 27 Feb 2022 23:33:57 -0500 Subject: [PATCH] login functional but no disconnect ayy. --- about.html | 4 +- api/ayy.php | 131 ------------------------------------ api/client.php | 97 ++++++++++++++++++++++++++ api/client_files/fds.txt | 0 api/client_files/fdsa.txt | 0 api/client_files/fdsfds.txt | 0 api/mmn.js | 5 +- api/yeet.php | 6 +- index.html | 4 +- login.html | 10 ++- products.html | 6 +- 11 files changed, 117 insertions(+), 146 deletions(-) delete mode 100644 api/ayy.php create mode 100644 api/client.php create mode 100644 api/client_files/fds.txt create mode 100644 api/client_files/fdsa.txt create mode 100644 api/client_files/fdsfds.txt diff --git a/about.html b/about.html index f7bd0bb..9630cf9 100644 --- a/about.html +++ b/about.html @@ -20,8 +20,8 @@ diff --git a/api/ayy.php b/api/ayy.php deleted file mode 100644 index 9b4bbd6..0000000 --- a/api/ayy.php +++ /dev/null @@ -1,131 +0,0 @@ -0 && $num3>0) - { - echo "" . $ach . " || good shit boiis <3
quote already added"; - } - else if ($num3>0) - { - echo "" . $ach . " || good shit boiis <3
you can add your quote by entering quote:your quote"; - } - else - { - echo "" . $ach . ""; - } -} - -if (isset($_POST["invite"])) -{ - $query = "SELECT code FROM invites where code LIKE '". $_POST["invite"] ."'"; - $result = mysqli_query($conn, $query); - $num = mysqli_num_rows($result); - - if (strpos($_POST["invite"], $quotestr) !== false && $num3>0) - { - if ($num5 > 0) - { - json("quote.alreadyadded"); - } - else - { - $quote = str_replace($quotestr, "", $_POST["invite"]); - $sqlquote = "INSERT into quotes (id, quote, ip) VALUES ('". $idquotes ."', '" . $quote . "', '" . $ip . "')"; - - if (mysqli_query($conn, $sqlquote)) - json("db.success"); - else - { - json("db.error"); - } - - } - } - - elseif ($_POST["invite"] == $noi) - { - json("noi"); - } - - elseif ($_POST["invite"] == $sui) - { - json("sui"); - } - - elseif ($_POST["invite"] == $str) - { - json($strb64); - } - - elseif ($num>0) - { - if ($num3>0) - { - json("already.done"); - } - else - { - $sql = "INSERT into achieved (id, ip) VALUES ('". $id ."', '" . $ip . "')"; - mysqli_query($conn, $sql); - json(true); - } - } - - else - { - json(false); - } -} - -function getUserIpAddr() -{ -// https://www.codexworld.com/how-to/get-user-ip-address-php/ -if (!empty($_SERVER['HTTP_CLIENT_IP'])) -{ - $ip = $_SERVER['HTTP_CLIENT_IP']; -} -elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) -{ - $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; -} -else -{ - $ip = $_SERVER['REMOTE_ADDR']; -} -return $ip; -} - -function json($x) -{ - header("Content-type: application/json"); - echo json_encode(array('x'=>$x)); -} - - - -?> \ No newline at end of file diff --git a/api/client.php b/api/client.php new file mode 100644 index 0000000..cba6f8a --- /dev/null +++ b/api/client.php @@ -0,0 +1,97 @@ + + + + + + + Le pain bleu + + + + + + + + + + +

LE PAIN BLEUSEULEMENT BLEU  

+ + 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(); + ?> +
+
+
+
+
+ +
+ '.$file.''; + } + } + closedir($handle); + } + ?> +

Fichiers:

+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/api/client_files/fds.txt b/api/client_files/fds.txt new file mode 100644 index 0000000..e69de29 diff --git a/api/client_files/fdsa.txt b/api/client_files/fdsa.txt new file mode 100644 index 0000000..e69de29 diff --git a/api/client_files/fdsfds.txt b/api/client_files/fdsfds.txt new file mode 100644 index 0000000..e69de29 diff --git a/api/mmn.js b/api/mmn.js index df5729d..f10d60d 100644 --- a/api/mmn.js +++ b/api/mmn.js @@ -8,11 +8,10 @@ function chkLogin(woof, miaw) { document.getElementById("nomd").value = ""; document.getElementById("mdp").value = ""; - if (typeof data.x === "string") + if (data == "redirect" || document.cookie) { - document.getElementById("oof").innerHTML = data.x; + window.location = 'api/client.php'; } - }); } diff --git a/api/yeet.php b/api/yeet.php index 475f4b8..ae88bf9 100644 --- a/api/yeet.php +++ b/api/yeet.php @@ -11,16 +11,16 @@ $rus = mysqli_query($conn, $user_sql); $rps = mysqli_query($conn, $pass_sql); if ($rus->num_rows > 0) { - echo "** found user **"; while($row = $rps->fetch_assoc()) { $oof = password_verify($cat, $row["pass"]); if ($oof) { - jsonLogin("oof","moof","1234"); + setcookie("user", $dog, time() + (86400 * 30), "/"); + setcookie("pass", $row["pass"], time() + (86400 * 30), "/"); + echo "redirect"; } else { - echo "***** nope"; } } } else { diff --git a/index.html b/index.html index 35e9340..f262d5e 100644 --- a/index.html +++ b/index.html @@ -20,8 +20,8 @@ diff --git a/login.html b/login.html index 0e7405c..23cf7fb 100644 --- a/login.html +++ b/login.html @@ -13,6 +13,12 @@ + @@ -23,8 +29,8 @@ diff --git a/products.html b/products.html index 6b6a192..446f1dc 100644 --- a/products.html +++ b/products.html @@ -19,10 +19,10 @@