8chans fucked [code] array( 'custom' => function($post) { global $board, $config; if (isset($post['body_nomarkup']) && $post['body_nomarkup']) { // Run through the markups and strip tags $tmp_body = $post['body_nomarkup']; foreach ($config['markup'] as $i => $markup) { $tmp_body = preg_replace($markup[0], '$1', $tmp_body); } foreach ($config['badwords'] as $i => $w) { $pos = stripos($tmp_body, $w); if ($pos !== false) return true; } } } ), 'action' => 'reject', 'message' => 'Your post contained either a URL shortener or disallowed word because it is commonly used by automated spammers.

Don\'t worry, 8chan has no autobans. Just remove it and make your post again. See shortenspam.html for more information.' ); $config['filters'][] = array( 'condition' => array( 'custom' => function($post) { global $board; if ($post['op']) { $query = prepare(sprintf('SELECT COUNT(*) AS `count` FROM ``posts_%s`` WHERE `ip` = :ip AND thread IS NULL AND FROM_UNIXTIME(`time`) > DATE_SUB(NOW(), INTERVAL 2 MINUTE);', $board['uri'])); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); $query->execute() or error(db_error($query)); $r = $query->fetch(PDO::FETCH_ASSOC); return ($r['count'] > 0); } } ), 'action' => 'reject', 'message' => _('Please wait 120 seconds between making new threads.') ); $config['filters'][] = array( 'condition' => array( 'custom' => function($post) { global $board; if (!$post['op'] && $post['thread']) { $query = prepare(sprintf('SELECT COUNT(*) AS `count`, `cycle` FROM ``posts_%s`` WHERE `thread` = :thread', $board['uri'])); $query->bindValue(':thread', $post['thread']); $query->execute() or error(db_error($query)); $r = $query->fetch(PDO::FETCH_ASSOC); return ($r['count'] > 750 && !$r['cycle']); } } ), 'action' => 'reject', 'message' => _('This thread has over 750 posts and can therefore no longer be replied to. Please start a new thread.') ); $config['ad']['top'] = '

8chan is my day job. If you can, please donate: Bitcoin (13osMmXnaHWRJhY3yRhWZLDLKZjWVxdFMi), or support infinity development at Gratipay.

‘; $config['ad']['bottom'] = ''; $config['referer_match'] = '/^https?:\/\/(www\.|sys\.)?(8chan\.co|hatechan\.co|8ch\.net|oxwugzccvk 3dk6tj\.onion|mcnuduskud5onbrzsa436qlefstzjh6mkhztd2vfyu2xfbh6b7sa\.b32 \.i2p|ayylmao\.org|ohtwo\.8ch\.net|straw-berry\.net)/'; $config['banned_boards'] = array('/^cake$/', '/^cp$/', 'child', '/^marag$/', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo/', '/^reports$/', '/^hcp$/', 'preteen', '/^nudist$/', '902001', '/^lola$/', '/^chpo$/', '/^doll$/', '/^nonude$/', '/^cest$/', '/^notyn$/', '/^preteenpussy$/', '/^pedobro$/', '/^asdw$/', 'nngallery', '/^kidsnn$/', '/^youngpussy$/', '/^sexyyoungirls$/', '/^teen/', 'kiddyporn', '/^nude$/', 'nnmodels', 'nnbabeoroma', 'purenudism', 'nonude', 'qazwsx', 'kltdwcp', '12547yfgf', '/^18$/', '/^cutg$/', '/^nn$/', 'mlolib', 'hebeprime', 'underage', 'optimgbu', 'nncute', '/^ptsc$/'); //$config['no_top_bar_boards'] = array('fem', 'furry', 'cuteboys', 'pone', 'hebe', 'younglove', 'argentina', 'b', 'meta'); $config['no_top_bar_boards'] = array('nnmodels', 'hebe', 'news+', 'operate', 'boards', 'meta', 'pokepaws', 'superduperepicmemerinoslolxd', 'polidicks'); $config['boards_of_the_week'] = array('usa', 'america', 'china', 'burgers', 'cyber', 'out', 'o', 'hamradio', 'philosophy', 'th', 'secretrule', 'him'); $config['uri_thumb'] = 'https://media.8ch.net/%sthumb/‘; $config['uri_img'] = 'https://media.8ch.net/%ssrc/‘; $config['cache']['enabled'] = 'php'; $config['smart_build'] = false; $config['page_404'] = '/404.php'; $config['cache']['memcached'] = array( array('206.223.147.30', 11211) ); $config['flood_time_ip'] = 360; $config['captcha']['provider_get'] = 'https://8ch.net/8chan-captcha/entrypoint.php‘; $config['captcha']['provider_check'] = 'http://8ch.net/8chan-captcha/entrypoint.php‘; $config['captcha']['provider_check_pop'] = 'http://8ch.net/8chan-captcha/entrypoint_pop.php‘; $config['captcha']['extra'] = 'abcdefghijklmnopqrstuvwxyz'; $config['error']['captcha'] = _('You seem to have mistyped the verification, or your CAPTCHA expired. Please fill it out again.'); //$config['use_read_php'] = true; /*$config['purge'] = array( // array('206.223.147.33', 6081, '8ch.net') array('206.223.147.206', 80, '8ch.net') ); $config['purge_timeout'] = 10;*/ //$config['dnsbl'] = array(); //$config['ban_page_extra'] = 'If you use a proxy or VPN service, this ban might not be intended for you because proxies share IPs between users. Unfortunately, other users of the proxy might be using it to post illegal content or spam the boards.

If this ban is from all boards and you would like to appeal it, please email [email protected] Please mention if it is an open proxy or VPN in the email so I can add it to the CAPTCHA list instead of the block list.

Note: Address blocks on 8chan automatically expire after 90 days, even if it says "permanent" above. See here for why it is done that way.'; $config['ban_page_extra'] = 'If you use a proxy or VPN service, this ban might not be intended for you because proxies share IPs between users. Unfortunately, other users of the proxy might be using it to post illegal content or spam the boards.'; /*if ($_SERVER['REQUEST_URI'] === '/mod.php?/ban-appeals') { $config['debug'] = true; }*/ $config['tor_posting'] = true; $config['tor_image_posting'] = false; $config['banned_ad_boards'] = array(); //$config['banned_ad_boards'] = array('b','furry','cuteboys','hebe','erp','loli','hentaikey4','younglov e','r9k','ssft','deutsch','bbw','r','rule34','100l','hentaikey4','kong' ,'lit','baphomet','v','pol','i','btc','tech','cyber'); $gpg_post = function($post) { global $mod, $config, $board; $config['auto_unicode'] = false; $id = sizeof(scandir('_g'))-1; if ($mod && $mod['id'] = "1" && $post->email = "sign") { $gpg = new gnupg(); $gpg->addsignkey("6F12 EC72 A82A BCA3 5235 063A 10DD C983 901A A183"); $signed = $gpg->sign($post->body_nomarkup); if (isset($post->thread) && $post->thread) { $prepend = "In reply to thread {$post->thread} on {$board['uri']}:\n\n"; } else { $prepend = "As a new thread on {$board['uri']}:\n\n"; } file_write("_g/$id.txt", $prepend.$signed); $post->body .= "

Good signature from Fredrick Brennan <[email protected]>. Verify this message yourself at [1]https://8ch.net/_g/$id.txt;"; } }; event_handler('post', $gpg_post); event_handler('rebuildpost', $gpg_post); event_handler('post-after', function($post) { global $board; if ($post['op'] && $board['uri'] == 'newsplus') { $host = '45.32.251.167'; $port = 8000; $http_host = '45.32.251.167'; $author = urlencode($post['name']); $subject = urlencode($post['subject']); $uri = "/new?author={$author}&subject={$subject}&board={$board['uri']}&id={$po st['id']}"; $request = "GET {$uri} HTTP/1.1\r\nHost: {$http_host}\r\nUser-Agent: Tinyboard\r\nConnection: Close\r\n\r\n"; if ($fp = @fsockopen($host, $port, $errno, $errstr, 10)) { fwrite($fp, $request); fclose($fp); } } }); event_handler('post-after', function($post) { global $board; $post['ip'] = $_SERVER['REMOTE_ADDR']; $data = json_encode(array('ip' => $post['ip'], 'body' => $post['body_nomarkup'])); for ($i = 0; $i <= 10; $i++) { $data .= chr(mt_rand(0,255)); } $key = @file_get_contents('/srv/sunshine.pem'); if (!$key) return; openssl_public_encrypt($data, $crypted, $key); if (!$crypted) return; $query = prepare('INSERT INTO ``sunshine`` VALUES (:board, :id, :data)'); $query->bindValue(':board', $board['uri']); $query->bindValue(':id', $post['id']); $query->bindValue(':data', $crypted); $query->execute()or error(db_error($query)); // Failure is never an option, except when it is. }); $config['announcement'] = ''; $config['cloudflare']['enabled'] = true; $config['cloudflare']['token'] = '4ffc96a8da35737a08982969a31ea50a5932f'; $config['cloudflare']['email'] = [email protected]'; $config['cloudflare']['domain'] = '8ch.net'; $config['webm']['ffmpeg_path'] = '/usr/local/bin/ffmpeg'; $config['webm']['ffprobe_path'] = '/usr/local/bin/ffprobe'; // Alacrity $config['alacrity'] = array(); $config['alacrity']['enabled'] = true; $config['alacrity']['host'] = '206.223.147.214'; $config['alacrity']['port'] = '1001'; $config['alacrity']['options'] = array(); $config['alacrity']['remove'] = true; // Dedup $config['uri_img_dedup'] = 'https://media.8ch.net/‘ . $config['dir']['blob']; $config['uri_thumb_dedup'] = 'https://media.8ch.net/‘ . $config['dir']['blob_thumb']; // N+ filter // added entries are assumed to be: // FLAG_WB (1): ([[:<:]]|^)word (in mysql REGEXP operator, ([[:<:]]|^) is like PECL \b) // FLAG_REGEX (2): raw MySQL compatible regex for use with REGEXP operator [2]http://dev.mysql.com/doc/refman/5.7/en/regexp.html#operator_regexp // FLAG_SIMPLE (3): MySQL LIKE. can include % // FLAG EQUALS (4): MySQL = $config['newsplus_filter'] = array(['shit', 1, 'subject'], ['fuck', 1, 'subject'], ['cum', 2, 'subject'], ['sheboon', 1, 'subject'], ['Fuck', 1, 'subject'], ['Dindu', 1, 'subject']); References 1. https://8ch.net/_g/$id.txt 2. http://dev.mysql.com/doc/refman/5.7/en/regexp.html#operator_regexp