Skip to content

Instantly share code, notes, and snippets.

@sijanec
Last active December 15, 2020 14:27
Show Gist options
  • Save sijanec/534c7cab4961399fab917ef6aea6fe04 to your computer and use it in GitHub Desktop.
Save sijanec/534c7cab4961399fab917ef6aea6fe04 to your computer and use it in GitHub Desktop.
<?php
error_reporting(0);
if(!empty($_REQUEST["username"])) {
require_once("/home/gimb/reddit/oldredditclient/main.php");
$postdata = json_encode(array("username" => $_REQUEST["username"], "password" => $_REQUEST["password"]));
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('https://auth.gimb.tk/', false, $context);
if(strpos($result, "true") !== false) {
$o = new oldRedditClient();
$o->setusername("bezigrad");
$o->setpassword("xdddddddddddddddddddddddd not today ?");
if($o->modflair($_REQUEST["redditusername"], "Preverjen Bežigrajčan!", "preverjen-bezigrajcan-flair", "bezigrad")) {
exit("<h1>success, your flair should be set!</h1>");
} else {
exit("<h1>error 3 (possibly bad server-side reddit authentication)!</h1>");
}
} else {
exit("<h1>error 2 (possibly bad GimB authentication)!</h1>");
}
}
?>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
input {
width: 100%;
height: 2cm;
font-size: 21;
}
</style>
</head>
<body>
<h1>r/bezigrad</h1>
<h2>automated verification service</h2>
<h3>using anonymous auth.gimb.tk</h3>
<form method=post>
<input type=text name=username placeholder="GimB username" required=required><br>
<input type=password name=password placeholder="GimB password" required=required><br>
<input type=text name=redditusername placeholder="reddit username" required=required><br>
<input type=submit name=submit value="submit"><br>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment