dehlirious / pocketproxy Goto Github PK
View Code? Open in Web Editor NEWA simple PHP web proxy.
Home Page: https://github.com/dehlirious/PocketProxy
License: GNU General Public License v3.0
A simple PHP web proxy.
Home Page: https://github.com/dehlirious/PocketProxy
License: GNU General Public License v3.0
Hey i had this on to of my personnal php.
I'm not real php dev ^^ then i use OPENAI that why i'm not doing PR
session_start();
// Your password
$motDePasseSécurisé = "XXX";
// Auth test
function estAuthentifié() {
return isset($_SESSION["authenticated"]) && $_SESSION["authenticated"] === true;
}
// Form
if ($_SERVER["REQUEST_METHOD"] === "POST") {
// test if auth
if (estAuthentifié()) {
header("Location: {$_SERVER['PHP_SELF']}");
exit();
}
// Get password
$motDePasseEntré = $_POST["password"];
// test password
if ($motDePasseEntré === $motDePasseSécurisé) {
// Mot de passe correct, créez une session
$_SESSION["authenticated"] = true;
// Redirigez vers la même page pour éviter le renvoi du formulaire lors du rechargement
header("Location: $_SERVER[REQUEST_URI]");
exit();
} else {
// Mot de passe incorrect, affichez un message d'erreur
$erreur = "Mot de passe incorrect";
}
}
// if no auth
if (!estAuthentifié()) {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>protected area</title>
</head>
<body>
<?php if (isset($erreur)) : ?>
<p><?php echo $erreur; ?></p>
<?php endif; ?>
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
<label for="password">Mot de passe :</label>
<input type="password" name="password" required>
<button type="submit">Valider</button>
</form>
<?php
// exit if not auth
exit();
?>
</body>
</html>
<?php
}
I set :
$this->httpvariable = "https";
But
at line 61
define("PROXY_PREFIX", $this->httpvariable . (isset($_SERVER["HTTPS"]) ? "s" : "") . "://" . $this->prefixHost . "" //.$prefixPort //was removed because it displayed port 80 and i haven'>
. $_SERVER["SCRIPT_NAME"] . "?");
You add s when $_SERVER["HTTPS"] exist.
that create someting with httpss://site.....
As you can see some ressources are not proxified
Website test :
https://tastewp.com/
Hi looks like syntax/code issue :
[Mon Apr 24 19:16:52.864349 2023] [php:error] [pid 39956] [client 10.11.0.4:54794] PHP Parse error: Unmatched '}' in /var/www/PocketProxy/pocketproxy.php on line 491, referer
Hello
As you can see since last update it's fully buged looping on
if found this in your code
Line 1074 in b778459
I did not add to suspicious website
I log i got:
"PHP Fatal error: Uncaught Error: Call to undefined function Gregwar\Captcha\imagecreatetruecolor() in /var/www/PocketProxy/Captcha/AIO-Captcha.php:36\nStack trace:\n#0 /var/www/PocketProxy/pocketproxy.php(478): Gregwar\Captcha\CaptchaBuilder->build()\n#1 {main}\n thrown in /var/www/PocketProxy/Captcha/AIO-Captcha.php on line 36, referer: https://mesh.minouche.club/pocketproxy.php"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.