From 3aa01807741ffad103b9f6a74d878e58f2e828e8 Mon Sep 17 00:00:00 2001 From: lolcat Date: Mon, 16 Oct 2023 02:30:43 -0400 Subject: captcha and imgur, findthatmeme, yep imagesearch --- web.php | 68 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'web.php') diff --git a/web.php b/web.php index e34672d..4df2609 100644 --- a/web.php +++ b/web.php @@ -10,11 +10,11 @@ $frontend = new frontend(); $get = $frontend->parsegetfilters($_GET, $filters); -$frontend->loadheader( - $get, - $filters, - "web" -); +/* + Captcha +*/ +include "lib/captcha_gen.php"; +new captcha($frontend, $get, $filters, true); $payload = [ "class" => "", @@ -44,6 +44,35 @@ try{ die(); } +/* + Prepend Oracle output, if applicable +*/ +include("oracles/encoder.php"); +include("oracles/calc.php"); +include("oracles/time.php"); +include("oracles/numerics.php"); +$oracles = [new calculator(), new encoder(), new time(), new numerics()]; +$fortune = ""; +foreach ($oracles as $oracle) { + if ($oracle->check_query($_GET["s"])) { + $resp = $oracle->generate_response($_GET["s"]); + if ($resp != "") { + $fortune .= "
"; + foreach ($resp as $title => $r) { + if ($title) { + $fortune .= "

".htmlspecialchars($title)."

".htmlspecialchars($r)."
"; + } + else { + $fortune .= "".$r."
"; + } + } + $fortune .= "Answer provided by oracle: ".$oracle->info["name"]."
"; + } + break; + } +} +$payload["left"] = $fortune; + $answerlen = 0; /* @@ -475,35 +504,6 @@ if($c !== 0){ $payload["left"] .= ''; } -/* - Prepend Oracle output, if applicable -*/ -include_once("oracles/encoder.php"); -include_once("oracles/calc.php"); -include_once("oracles/time.php"); -include_once("oracles/numerics.php"); -$oracles = [new calculator(), new encoder(), new time(), new numerics()]; -$fortune = ""; -foreach ($oracles as $oracle) { - if ($oracle->check_query($_GET["s"])) { - $resp = $oracle->generate_response($_GET["s"]); - if ($resp != "") { - $fortune .= "
"; - foreach ($resp as $title => $r) { - if ($title) { - $fortune .= "

".htmlspecialchars($title)."

".htmlspecialchars($r)."
"; - } - else { - $fortune .= "".$r."
"; - } - } - $fortune .= "Answer provided by oracle: ".$oracle->info["name"]."
"; - } - break; - } -} -$payload["left"] = $fortune . $payload["left"]; - /* Load next page */ -- cgit v1.2.3