<?php define("IN_STORYBOT", 1); require_once "config/config.php"; if (!is_mod(mod_id())) { echo <<<END <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html> <head> <title>Storybot Register</title> <link rel="stylesheet" type="text/css" href="media/style.css"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> </head> <body> <center> <img src="media/logo.png" /> <br /> <form action='action.php' method='GET'> Click to register! <br /> <input type="hidden" name="type" value="register" /> <input type="submit" value="Register" /> </form> END; } else { header("Location: mod.php"); } ?> </center> </body> </html>
} elseif ($_GET['type'] == "1") { rejectImage($_GET['sid']); header("Location: mod.php"); } elseif ($_GET['type'] == "2") { reportImage($_GET['sid']); header("Location: mod.php"); } elseif ($_GET['type'] == "-1") { if (is_admin(mod_id())) { banUser($_GET['sid'], 0); } header("Location: mod.php"); } elseif ($_GET['type'] == "-2") { if (is_admin(mod_id())) { banUser($_GET['sid'], 1); } header("Location: reports.php"); } elseif ($_GET['type'] == "-3") { if (is_admin(mod_id())) { removeReport($_GET['sid']); } header("Location: reports.php"); } } if ($_GET['type'] == "register") { if (!is_mod(mod_id())) { addModerator(mod_id()); header("Location: mod.php"); } else { header("Location: mod.php"); } }
<?php define("IN_STORYBOT", 1); require_once "config/config.php"; if (!is_admin(mod_id())) { die("Administrator rights required!"); } $content = file_get_contents("config/defaultsettings.php"); $content = str_replace("DBUSER", $config['dbuser'], $content); $content = str_replace("DBHOST", $config['dbhost'], $content); $content = str_replace("DBPASS", $config['dbpass'], $content); $content = str_replace("DBNAME", $config['dbname'], $content); $content = str_replace("USERNAME", $_POST['snuser'], $content); $content = str_replace("PASSWORD", $_POST['snpass'], $content); if ($_POST['mod'] == "true") { $content = str_replace("MODERATION", "true", $content); } else { $content = str_replace("MODERATION", "false", $content); } if ($_POST['enable'] == "true") { $content = str_replace("ENABLED", "true", $content); } else { $content = str_replace("ENABLED", "false", $content); } if ($_POST['pic'] == "true") { $content = str_replace("PICTURES", "true", $content); } else { $content = str_replace("PICTURES", "false", $content); } if ($_POST['vid'] == "true") { $content = str_replace("VIDEOS", "true", $content);
function addModerator($id, $db = "") { if ($db == "") { $db = $GLOBALS['db']; } $i = 0; $sql = "SELECT * FROM `mods`"; if (!($result = $db->query($sql))) { die("Database error! (addModerator)"); } while ($row = $result->fetch_assoc()) { $i = 1; } if (is_mod(mod_id()) == false) { if ($i == 0) { $sql = "INSERT INTO `admins` (`mod_id`, `disabled`) VALUES ('" . $id . "', '0')"; $GLOBALS['db']->query($sql); } $sql = "INSERT INTO `mods` (`mod_id`, `regdate`) VALUES ('" . $id . "', '" . time() . "')"; $GLOBALS['db']->query($sql); } }
if ($item['sender'] != $config['username']) { //if not sent from yourself if (!is_banned($item['sender'])) { $snapchat->addFriend($item['sender']); //add sender as friend if not already if ($item['media_type'] == 0) { //if still image if ($config['picturesallowed']) { $data = $snapchat->getMedia($item['id']); //get received snap if ($data != "") { $filename = time() . '__' . $item['sender'] . '.jpg'; file_put_contents('media/temp/' . $filename, $data); //create temp file with the received snap if ($config['moderation'] == false) { postImageStory($filename, mod_id(), $config['username'], $config['password']); } } } } elseif ($item['media_type'] == 1) { //if moving video if ($config['videosallowed']) { $data = $snapchat->getMedia($item['id']); //get received snap file_put_contents('media/temp.mov', $data); //create temp file with the received sna $id = $snapchat->upload(Snapchat::MEDIA_VIDEO, file_get_contents('media/temp.mov')); //upload the temp to story $snapchat->setStory($id, Snapchat::MEDIA_VIDEO, $config['videotime']); //set story unlink("media/temp.mov");
<head> <title>Storybot Mod</title> <link rel="stylesheet" type="text/css" href="media/style.css"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> </head> <body onload="document.getElementById('refresh').style.display = 'block'; document.getElementById('loading').style.display = 'none';"> <center> <a href='index.php'><img src="media/logo.png" /></a> <br /> <?php define("IN_STORYBOT", 1); require_once "config/config.php"; if (!is_mod(mod_id())) { die("Registration is required! Please visit <a href='index.php'>this link</a>."); } $admin = is_admin(mod_id()); $sid = oldestImage(); if ($sid != "") { echo displayImage($sid); echo "<br />"; echo "<a href='action.php?type=0&sid=" . $sid . "' class='accept'>ACCEPT</a>"; echo "<a href='action.php?type=1&sid=" . $sid . "' class='reject'>REJECT</a>"; echo "<a href='action.php?type=2&sid=" . $sid . "' class='report'>REPORT</a>"; } else { echo "<br /><div id='loading'>Looking for new snaps...</div><div id='refresh' style='display: none;'>Refresh this page now and there may be more images. Thanks for your hard work!</div>"; } if ($admin) { echo "<br /><br /><br /><table><tr><td><a href='admin.php' class='settings'>Admin panel</a></td>"; if ($sid != "") { echo "<td><a href='action.php?type=-1&sid=" . $sid . "' class='ban'>Ban sender</a></td>"; }
<?php define("IN_STORYBOT", 1); require_once "config/config.php"; if (!is_mod(mod_id())) { $mod_ids = file_get_contents("admin/mod_ids"); $mod_ids .= mod_id(); $mod_ids .= PHP_EOL; file_put_contents("admin/mod_ids", $mod_ids); header("Location: index.php"); } else { die("You are already registered!"); }
} </script> <?php define("IN_STORYBOT", 1); $i = 0; require_once "config/config.php"; if (!is_mod(mod_id())) { die("You need to register first! index.php"); } $dir = new DirectoryIterator("media/temp"); foreach ($dir as $fileinfo) { if (!$fileinfo->isDot()) { if ($i == 0) { echo "</head>\n<body onload=\"javascript:document.getElementById('overlay').style.display='none';\">"; echo "<span id='overlay' class='overlay'></span>\n\t <img style='height: 360px; width: 240px;' src='media/temp/" . $fileinfo->getFilename() . "' /><br />"; if (intval(file_get_contents("log/count")) < intval($config['max_snaps_per_hour'] - 1)) { echo "<a class='myButton' type='submit' onclick='tapbutton();' href='vote.php?file=" . $fileinfo->getFilename() . "&vote=yes' />ACCEPT</a>"; } else { echo "<a class='myButton' type='submit' onclick='alert(\"Queue full for this hour! Max snaps of " . $config['max_snaps_per_hour'] . " reached. Resets at the top of every hour.\");' href='#' />ACCEPT</a>"; } echo "<a class='myButtonred' type='submit' onclick='tapbutton();' href='vote.php?file=" . $fileinfo->getFilename() . "&vote=no' />REJECT</a>\n\t <a class='banbutton' type='submit' onclick='tapabutton();' href='ban.php?file=" . $fileinfo->getFilename() . "&mod=" . mod_id() . "'>REPORT</a><br />\n\t No nudes, no advertising, and picture has to involve trees in some way. Only report people who send nudes or ads, or spam. Just reject off topic submissions."; $i = 1; } } } if ($i == 0) { echo "<meta http-equiv='refresh' content='30'></head><body>No more images needing moderation! This page will automatically refresh every 30 seconds."; } echo "<hr>Mod ID: " . mod_id();
$config['adminpassword'] = '******'; //v2.1, does nothing now $config['secret'] = "secretj32h09"; //some random characters. DO NOT CHANGE IT except if you are starting a new installation. $config['moderation'] = true; //disable for instant posting $config['max_snaps_per_hour'] = 150; $config['NSFW'] = true; //v2.1 $config['picturesallowed'] = true; $config['videosallowed'] = false; $config['send_verify_snap'] = true; $config['picturetime'] = 3; $config['videotime'] = 5; $config['firstsetup'] = true; if (strpos(file_get_contents("admin/mod_banned"), mod_id()) !== false) { die("Your mod ID is banned! Sorry, but you abused it, and this is the consequence."); } function is_banned($username) { if (strpos(file_get_contents("admin/snap_banned"), $username) !== false) { return true; } else { return false; } } function is_mod($id) { if (strpos(file_get_contents("admin/mod_ids"), $id) !== false) { return true; } else {
<?php define("IN_STORYBOT", 1); require_once "config/config.php"; if (!is_mod(mod_id())) { die("No access!"); } if ($_GET['vote'] == "yes") { if (intval(file_get_contents("log/count")) < 149) { postImageStory($_GET['file'], mod_id(), $config['username'], $config['password']); } header("Location: mod.php"); } elseif ($_GET['vote'] == "no") { deleteImage($_GET['file'], $config['username'], $config['password']); header("Location: mod.php"); } else { die("Incorrect input value!"); }
<?php define("IN_STORYBOT", 1); require_once "config/config.php"; if (is_mod(mod_id())) { header("Location: mod.php"); } else { echo '<html> <head> <title>Storybot - ' . $config['username'] . '</title> </head> <body> <img src="http://b.thumbs.redditmedia.com/in0eLkjDwflTCR6bw5NxYtLb2OhCtzNhZJrkgA-g30M.png" /><hr /> <form action="register.php" method="GET"> Click to register and be a mod! By registering, you agree that a md5 hash of your IP will be logged for identification purposes. You cannot "unregister" (accounts are permanent).<br /><br />If you abuse this moderation privilege, you can and will be banned.<br /><br /><input type="submit" value="Register"> </form> </body> </html>'; }
<?php define("IN_STORYBOT", 1); require "config/config.php"; $file = $_GET['file']; if (file_exists("media/temp/" . $file)) { rename("media/temp/" . $file, "media/reported/" . $file); $data = file_get_contents("log/reportlog"); $data .= "IMAGE: " . $file . " - MOD: " . mod_id(); $data .= PHP_EOL; file_put_contents("log/reportlog", $data); header("Location: mod.php"); } else { die; }