Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function Indent($count)
- {
- $indent = "";
- for ($i = 0; $i < $count; $i++) {
- $indent = $indent . " ";
- }
- return $indent;
- }
- function Top()
- {
- print "<!DOCTYPE html>\n";
- print "<html>\n";
- print Indent(1) . "<head>\n";
- print Indent(2) . "<meta charset=\"UTF-8\">\n";
- print Indent(2) . "<title>Bitchute Blocklist</title>\n";
- print Indent(1) . "</head>\n";
- print Indent(1) . "<body>\n";
- print Indent(2) . "<script src=\"panel.js\"></script>\n";
- print "\t\t<h1>Bitchute Blocklist</h1>\n";
- print Indent(2) . "<div class=\"form-block-user\">\n";
- print Indent(3) . "<h2>User Blocking</h2>\n";
- print Indent(3) . "<form method=\"post\" action=\"/BTList.php\">\n";
- print Indent(4) . "<input type=\"checkbox\" id=\"AV\" name=\"AV\" value=\"1\" checked=\"1\" title=\"Block User Avatar\">\n";
- print Indent(4) . "<label for=\"AV\" title=\"Block User Avatar\">Avatar</label>\n";
- print Indent(4) . "<input type=\"checkbox\" id=\"AC\" name=\"AC\" value=\"1\" checked=\"1\" title=\"Block User Actions Bar\">\n";
- print Indent(4) . "<label for=\"AC\" title=\"Block User Actions Bar\">Actions</label>\n";
- print Indent(4) . "<input type=\"checkbox\" id=\"CM\" name=\"CM\" value=\"1\" checked=\"1\" title=\"Block User Comments\">\n";
- print Indent(4) . "<label for=\"CM\" title=\"Block User Comments\">Comments</label>\n";
- print Indent(4) . "<input type=\"checkbox\" id=\"AT\" name=\"AT\" value=\"1\" checked=\"1\" title=\"Block User Attachments\">\n";
- print Indent(4) . "<label for=\"AT\" title=\"Block User Attachments\">Attachments</label><br>\n";
- print Indent(4) . "<label for=\"BID\" title=\"data-user-id To Block\">ID to block:</label>\n";
- print Indent(4) . "<input type=\"text\" id=\"BID\" name=\"BID\" value=\"\" title=\"data-user-id To Block\">\n";
- print Indent(4) . "<input type=\"submit\" value=\"🏴\">\n";
- print Indent(3) . "</form>\n";
- print Indent(2) . "</div>\n";
- print Indent(2) . "<div class=\"form-block-word\">\n";
- print Indent(3) . "<h2>Language Blocking</h2>\n";
- print Indent(3) . "<form method=\"post\" action=\"/BTList.php\">\n";
- print Indent(4) . "<label for=\"BWD\">Word(s) to block:</label>\n";
- print Indent(4) . "<input type=\"text\" id=\"BWD\" name=\"BWD\" value=\"\">\n";
- print Indent(4) . "<input type=\"submit\" value=\"🏴\">\n";
- print Indent(3) . "</form>\n";
- print Indent(2) . "</div>\n";
- }
- function Bottom()
- {
- print Indent(1) . "</body>\n";
- print "</html>";
- }
- function Content()
- {
- $file = "./blocklist.txt";
- print Indent(2) . "<div class=\"blocked-users\">\n";
- print Indent(3) . "<h2>Blocked Users</h2>\n";
- print Indent(3) . "<table>\n";
- print Indent(4) . "<tr>\n";
- print Indent(5) . "<th>ID</th>\n";
- print Indent(5) . "<th>AV</th>\n";
- print Indent(5) . "<th>AC</th>\n";
- print Indent(5) . "<th>CM</th>\n";
- print Indent(5) . "<th>AT</th>\n";
- print Indent(5) . "<th>Del</th>\n";
- print Indent(4) . "</tr>\n";
- $nchar = "🖕";
- $ychar = "👍";
- $file_handle = fopen($file, "rb");
- while (!feof($file_handle)) {
- $line_of_text = fgets($file_handle);
- $parts = explode('\n', $line_of_text);
- if (!empty($parts[0])) {
- $specs = explode(',', trim($parts[0]));
- $formstart = Indent(5) . "<td>\n" . Indent(6) . "<form method=\"post\" action=\"/BTList.php\">\n";
- $formend = Indent(6) . "</form>\n" . Indent(5) . "</td>\n";
- print Indent(4) . "<tr>\n";
- print Indent(5) . "<td>\n";
- print Indent(6) . "<code onmouseover=\"this.style='color:red;'\" onmouseout=\"this.style=''\" onclick=\"document.getElementById('BID').value = this.innerHTML;\">" . $specs[0] . "</code>\n";
- print Indent(5) . "</td>\n";
- $char = $ychar;
- if ($specs[1] == 1) {
- $char = $nchar;
- }
- print $formstart;
- print Indent(7) . "<input type=\"hidden\" name=\"BID\" id=\"BID\" value=\"" . $specs[0] . "\">\n";
- if (!$specs[1]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AV\" id=\"AV\" value=\"1\">\n";
- }
- if ($specs[2]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AC\" id=\"AC\" value=\"1\">\n";
- }
- if ($specs[3]) {
- print Indent(7) . "<input type=\"hidden\" name=\"CM\" id=\"CM\" value=\"1\">\n";
- }
- if ($specs[4]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AT\" id=\"AT\" value=\"1\">\n";
- }
- print Indent(7) . "<input type=\"submit\" value=\"" . $char . "\">\n";
- print $formend;
- $char = $ychar;
- if ($specs[2] == 1) {
- $char = $nchar;
- }
- print $formstart;
- print Indent(7) . "<input type=\"hidden\" name=\"BID\" id=\"BID\" value=\"" . $specs[0] . "\">\n";
- if ($specs[1]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AV\" id=\"AV\" value=\"1\">\n";
- }
- if (!$specs[2]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AC\" id=\"AC\" value=\"1\">\n";
- }
- if ($specs[3]) {
- print Indent(7) . "<input type=\"hidden\" name=\"CM\" id=\"CM\" value=\"1\">\n";
- }
- if ($specs[4]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AT\" id=\"AT\" value=\"1\">\n";
- }
- print Indent(7) . "<input type=\"submit\" value=\"" . $char . "\">\n";
- print $formend;
- $char = $ychar;
- if ($specs[3] == 1) {
- $char = $nchar;
- }
- print $formstart;
- print Indent(7) . "<input type=\"hidden\" name=\"BID\" id=\"BID\" value=\"" . $specs[0] . "\">\n";
- if ($specs[1]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AV\" id=\"AV\" value=\"1\">\n";
- }
- if ($specs[2]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AC\" id=\"AC\" value=\"1\">\n";
- }
- if (!$specs[3]) {
- print Indent(7) . "<input type=\"hidden\" name=\"CM\" id=\"CM\" value=\"1\">\n";
- }
- if ($specs[4]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AT\" id=\"AT\" value=\"1\">\n";
- }
- print Indent(7) . "<input type=\"submit\" value=\"" . $char . "\">\n";
- print $formend;
- $char = $ychar;
- if ($specs[4] == 1) {
- $char = $nchar;
- }
- print $formstart;
- print Indent(7) . "<input type=\"hidden\" name=\"BID\" id=\"BID\" value=\"" . $specs[0] . "\">\n";
- if ($specs[1]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AV\" id=\"AV\" value=\"1\">\n";
- }
- if ($specs[2]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AC\" id=\"AC\" value=\"1\">\n";
- }
- if ($specs[3]) {
- print Indent(7) . "<input type=\"hidden\" name=\"CM\" id=\"CM\" value=\"1\">\n";
- }
- if (!$specs[4]) {
- print Indent(7) . "<input type=\"hidden\" name=\"AT\" id=\"AT\" value=\"1\">\n";
- }
- print Indent(7) . "<input type=\"submit\" value=\"" . $char . "\">\n";
- print $formend;
- print $formstart;
- print Indent(7) . "<input type=\"hidden\" name=\"DID\" id=\"DID\" value=\"" . $specs[0] . "\">\n";
- print Indent(7) . "<input type=\"submit\" value=\"🚽\">\n";
- print $formend;
- print Indent(4) . "</tr>\n";
- }
- }
- fclose($file_handle);
- print Indent(3) . "</table>\n" . Indent(2) . "</div>\n";
- $file = "./wordlist.txt";
- print Indent(2) . "<div class=\"blocked-words\">\n";
- print Indent(3) . "<h2>Blocked Language</h2>\n";
- $file_handle = fopen($file, "rb");
- $first = 0;
- while (!feof($file_handle)) {
- $line_of_text = fgets($file_handle);
- $parts = explode('\n', $line_of_text);
- if (!empty($parts[0])) {
- if ($first != 0) {
- print "<br>\n";
- }
- print Indent(3) . "<span>" . trim($parts[0]) . "</span>\n";
- print Indent(3) . "<form method=\"post\" action=\"/BTList.php\">\n";
- print Indent(4) . "<input type=\"hidden\" name=\"DWD\" id=\"DWD\" value=\"" . trim($parts[0]) . "\">\n";
- print Indent(4) . "<input type=\"submit\" value=\"🚽\">\n";
- print Indent(3) . "</form>";
- $first = $first + 1;
- }
- }
- fclose($file_handle);
- print "\n" . Indent(2) . "</div>\n";
- }
- if (isset($_REQUEST["BID"])) {
- $file = "./blocklist.txt";
- Top();
- $ID = $_REQUEST["BID"];
- if (!empty($ID)) {
- $av = 0;
- $ac = 0;
- $cm = 0;
- $at = 0;
- if (isset($_REQUEST["AV"]))
- $av = 1;
- if (isset($_REQUEST["AC"]))
- $ac = 1;
- if (isset($_REQUEST["CM"]))
- $cm = 1;
- if (isset($_REQUEST["AT"]))
- $at = 1;
- $IDO = $ID . "," . $av . "," . $ac . "," . $cm . "," . $at . "\n";
- $exists = 0;
- $file_handle = fopen($file, "rb");
- while (!feof($file_handle)) {
- $line_of_text = fgets($file_handle);
- $parts = explode('\n', $line_of_text);
- if (!empty($parts[0])) {
- $specs = explode(',', $parts[0]);
- if ($specs[0] == $ID) {
- $exists = 1;
- $stored = file_get_contents($file);
- $stored = str_replace($parts[0], $IDO, $stored);
- file_put_contents($file, $stored);
- }
- }
- }
- fclose($file_handle);
- if ($exists == 0)
- file_put_contents($file, $IDO, FILE_APPEND | LOCK_EX) or die('File Write Failure. ".$file ." Ensure the file exists and has correct permissions. (chmod a+w)');
- }
- Content();
- Bottom();
- } elseif (isset($_REQUEST["BWD"])) {
- $file = "./wordlist.txt";
- Top();
- $WD = $_REQUEST["BWD"];
- if (!empty($WD)) {
- $WD = $WD . "\n";
- file_put_contents($file, $WD, FILE_APPEND | LOCK_EX) or die('File Write Failure. ".$file ." Ensure the file exists and has correct permissions. (chmod a+w)');
- }
- Content();
- Bottom();
- } elseif (isset($_REQUEST["DID"])) {
- $file = "./blocklist.txt";
- Top();
- $del = $_REQUEST["DID"];
- if (!empty($del)) {
- $exists = 0;
- $file_handle = fopen($file, "rb");
- while (!feof($file_handle)) {
- $line_of_text = fgets($file_handle);
- $parts = explode('\n', $line_of_text);
- if (!empty($parts[0])) {
- $specs = explode(',', $parts[0]);
- if ($specs[0] == $del) {
- $stored = file_get_contents($file);
- $stored = str_replace($parts[0], "", $stored);
- file_put_contents($file, $stored);
- }
- }
- }
- fclose($file_handle);
- }
- Content();
- Bottom();
- } elseif (isset($_REQUEST["DWD"])) {
- $file = "./wordlist.txt";
- Top();
- $del = trim($_REQUEST["DWD"]) . "\n";
- if (!empty($del)) {
- $exists = 0;
- $file_handle = fopen($file, "rb");
- while (!feof($file_handle)) {
- $line_of_text = fgets($file_handle);
- $parts = explode('\n', $line_of_text);
- if (!empty($parts[0])) {
- if ($parts[0] == $del) {
- $stored = file_get_contents($file);
- $stored = str_replace($parts[0], "", $stored);
- file_put_contents($file, $stored);
- }
- }
- }
- fclose($file_handle);
- }
- Content();
- Bottom();
- } elseif (isset($_GET["Raw"])) {
- $file = "./blocklist.txt";
- print "[Adblock Plus 3.1]\n";
- print "!Expires: 1 hours (update frequency)\n";
- print "!Homepage: https://linuxhost/BTList.php\n";
- print "!Title: Bitchute Blocklist\n";
- print "!Specifically Blocked Users:\n";
- $file_handle = fopen($file, "rb");
- while (!feof($file_handle)) {
- $line_of_text = fgets($file_handle);
- $parts = explode('\n', $line_of_text);
- if (!empty($parts[0])) {
- $specs = explode(',', trim($parts[0]));
- if ($specs[1])
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-has(> div.comment-header > span.name[data-user-id=\"" . trim($specs[0]) . "\"]) > div.profile-picture\n";
- if ($specs[2])
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-has(> div.comment-header > span.name[data-user-id=\"" . trim($specs[0]) . "\"]) > div.wrapper > span.actions\n";
- if ($specs[3])
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-has(> div.comment-header > span.name[data-user-id=\"" . trim($specs[0]) . "\"]) > div.wrapper > div.content\n";
- if ($specs[4])
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-has(> div.comment-header > span.name[data-user-id=\"" . trim($specs[0]) . "\"]) > div.wrapper > div.attachments\n";
- }
- }
- fclose($file_handle);
- print "!Generally Blocked Language:\n";
- $file = "./wordlist.txt";
- $file_handle = fopen($file, "rb");
- while (!feof($file_handle)) {
- $line_of_text = fgets($file_handle);
- $parts = explode('\n', $line_of_text);
- if (!empty($parts[0])) {
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-contains(" . trim($parts[0]) . ") > div.wrapper > div.attachments\n";
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-contains(" . trim($parts[0]) . ") > div.wrapper > span.actions\n";
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-contains(" . trim($parts[0]) . ") > div.wrapper > div.content\n";
- print "bitchute.com#?#li.comment > div.comment-wrapper:-abp-contains(" . trim($parts[0]) . ") > div.profile-picture\n";
- }
- }
- fclose($file_handle);
- } else {
- Top();
- Content();
- Bottom();
- }
Add Comment
Please, Sign In to add comment