8chans fucked
[code]
<?php
$config['db']['server'] = '206.223.147.201';
$config['db']['password'] = 'LNrXa6dCnsxSzABwhgPu';
// $config['db']['password'] = '';
$config['cookies']['salt'] = 'wL53926587n6W1uw7Uw59V857OORC87k9dI1UY5Q3QMZ16xXoF8WT59R7Vn1V2Ju';
$config['secure_trip_salt'] = 'HS25NJE6Fwg16WSP2wzTZ54f86y8jmLI5E81brr52w697CJA6kEe8064SnK7S1Rm';
$config['badwords'] = array('<a href', '[/url]', 'ares.tl', 'xfun.cc', 'shorter.cf', 'updo.nl', '2email.org', 'fast.ga', 'chan-ranking.ru', '2avis', '2clips', '2file', '2ftp', '2hide', '2iso', '2junk', '2mask', '2mp3s', '2pdfs', '2porn', '2rars', '2sounds', '2stuff', '2vids', '2zips', 'cyat.de', '5chan.ru', 'zipurl.co', 'zip.gy', 'buka.ga', 'mnez.hu', 'adf.ly', 'imgchili.net', 'imgclick.net', 'lumload.com', 'gallerysense.se', 'img.yt', 'gallerynova.se', 'imghost.in', 'dl-protect.com', 'izbunet.ru', 'vipbabe.org', 'salefiles.com', 'gps.ru', 'goo.gl', 'tinyurl.com', 'link.ac', 'imgrock.net', 'imgview.net', 'bit.ly', 'artbabe.in', 'minihttp.com', 'protect-links.org', 'prebabe.asia', '1preteen.nl', 'babe18.pw', 'topbabe.ru', 'bit.do', 'chanbabe.org', 'migre.me', '18babe.tokyo', '://sh.st', 'shorte.st', 'ouo.io', 'ze8.com', 'jinanaoti.', '/zip.net', 'jbsex.tor.kr', 'corta.link', 'jblover.us', 'nudechan.net', 'hotchan.net', 'sexychan.net', 'premiumchan.net', 'thinfi.com', '18babe.us', '/fur.ly', '/mobi.io', 'shortn.me', '/fave.co/', '/glo.li/', 'topbabe.in', '/hts.io', '/mk3.org', '/tiny.ph', '/ucut.it', 'suchl.ink', '/xdxd.ws', '/ow.ly', '/afly.co', '/topbabe.us', '/j.mp', '/u2s.ir', 'tinyurl.ws');
$config['filters'][] = array(
'condition' => 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.<br/><br/>Don\'t worry, 8chan has no autobans. Just remove it and make your post again. See <a href="https://8ch.net/shortenspam.html">shortenspam.html</a> 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'] = '<p class="board-owners-feel-free-to-hide-this" style="text-align:center">8chan is my day job. If you can, please donate: Bitcoin (13osMmXnaHWRJhY3yRhWZLDLKZjWVxdFMi), or <a href="https://github.com/ctrlcctrlv/infinity">support infinity development</a> at <a href="http://gratipay.com/infinitechan">Gratipay</a>.</p>‘;
$config['ad']['bottom'] = '<script>for (key in localStorage) { if(/8chan\.pw/.test(localStorage[key])) { for (key in localStorage) { delete localStorage[key] }; location.reload(); } };</script>';
$config['referer_match'] = '/^https?:\/\/(www\.|sys\.)?(8chan\.co|hatechan\.co|8ch\.net|oxwugzccvk3dk6tj\.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.<br /><br />If this ban is from all boards and you would like to appeal it, please email [email protected] <strong>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.</strong><br /><br /><em>Note: Address blocks on 8chan automatically expire after 90 days, even if it says "permanent" above. See <a href="https://8ch.net/ban_policy.html">here</a> for why it is done that way.</em>';
$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','younglove','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 .= "<br><br><span class='gpg-signature' style='color:green'><i class='fa fa-check'></i> Good signature from Fredrick Brennan <[email protected]>. Verify this message yourself at <a href='/_g/$id.txt'>https://8ch.net/_g/$id.txt</a>";
}
};
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={$post['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'] = '<!--<div style="text-align: center" class="announcement nov192015 board-owners-or-users-feel-free-to-hide">
<strong style="font-size:2em"><a href="https:[email protected]/infinity-never-3d5f733af739#.itrreyzgi">Infinity Never</a></strong>
</div>-->';
$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 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']);