Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // 1. LOAD SECRETS FIRST
- @include('inc/secrets.php');
- /*
- * Instance Configuration (LIVE)
- * ----------------------
- */
- // ----------------------------------------------------------------
- // SPAM DEFENSE SYSTEM (LAYERS 1-9)
- // Updated: Dec 21, 2025 - 10:45 AM (Maximum Security)
- // ----------------------------------------------------------------
- // 1. DNS Blocklists
- $config['dnsbl'][] = 'rbl.efnetrbl.org';
- $config['dnsbl'][] = 'dnsbl-1.uceprotect.net';
- $config['dnsbl'][] = 'dnsbl.dronebl.org';
- $config['dnsbl'][] = 'torexit.dan.me.uk';
- // 2. LAYER 1: Block known Link Shorteners & Tools (Surface Check)
- // ADDED: us1.in
- $config['filters'][] = array(
- 'condition' => array(
- 'body' => '/(bit\.ly|tinyurl\.com|goo\.gl|t\.co|is\.gd|cli\.gs|yfrog\.com|migre\.me|ff\.im|tiny\.cc|url4\.eu|twit\.ac|su\.pr|twurl\.nl|snipurl\.com|short\.to|budurl\.com|ping\.fm|post\.ly|just\.as|bkite\.com|snipr\.com|fic\.kr|loopt\.us|doiop\.com|short\.ie|kl\.am|wp\.me|rubyurl\.com|om\.ly|to\.ly|bit\.do|t\.cn|lnkd\.in|db\.tt|qr\.ae|adf\.ly|goo\.gl|bitly\.com|curlm\.in|curlmin|ity\.im|q\.gs|po\.st|bc\.vc|twitthis\.com|u\.to|j\.mp|buzurl\.com|cutt\.us|u\.bb|yourls\.org|x\.co|prettylinkpro\.com|scrnch\.me|filoops\.info|vzturl\.com|qr\.net|1url\.com|tweez\.me|v\.gd|tr\.im|link\.zip\.net|shrturl|shorturl|nimje|t\.ly|goo\.su|rebrand\.ly|qrco\.de|ow\.ly|6url\.ru|x\.gd|cutt\.ly|shorturl\.at|us1\.in)/i',
- ),
- 'action' => 'reject',
- 'message' => 'Suspicious post.',
- 'reason' => 'Spam filter L1 (Shortener)'
- );
- // 3. LAYER 2: Unshortener (Deep Check)
- // Follows redirects.
- // ADDED: site, online, website, space, fun, pro, biz, info, cam, stream
- $config['filters'][] = array(
- 'condition' => array(
- 'unshorten' => '/\.(ru|cn|top|xyz|onion|gq|ml|ga|cf|tk|kp|ir|ws|pw|cc|icu|club|work|support|shop|zip|mov|live|buzz|click|in|site|online|website|space|fun|pro|biz|info|cam|stream)\b/i',
- ),
- 'action' => 'reject',
- 'message' => 'Suspicious post.',
- 'reason' => 'Spam filter L2 (Redirect)'
- );
- // 4. LAYER 3: Body Text Scan (Direct Link Check)
- // ADDED: site, online, website, space, fun, pro, biz, info, cam, stream
- $config['filters'][] = array(
- 'condition' => array(
- 'body' => '/\.(ru|cn|top|xyz|onion|gq|ml|ga|cf|tk|kp|ir|ws|pw|cc|icu|club|work|support|shop|zip|mov|live|buzz|click|in|site|online|website|space|fun|pro|biz|info|cam|stream)\b/i',
- ),
- 'action' => 'reject',
- 'message' => 'Suspicious post.',
- 'reason' => 'Spam filter L3 (TLD)'
- );
- // 5. LAYER 4: Suspicious Subdomain Prefixes
- $config['filters'][] = array(
- 'condition' => array(
- 'body' => '/(https?:\/\/|www\.)(t|s|u|v|go|l|click|link)\.[a-z0-9-]+\.[a-z]+/i',
- ),
- 'action' => 'reject',
- 'message' => 'Suspicious post.',
- 'reason' => 'Spam filter L4 (Prefix)'
- );
- // 6. LAYER 5: Block Abused Free Hosting
- $config['filters'][] = array(
- 'condition' => array(
- 'body' => '/(herokuapp\.com|netlify\.app|vercel\.app|pages\.dev|glitch\.me|firebaseapp\.com|onrender\.com|fly\.dev|surge\.sh|github\.io|gitlab\.io|stackblitz\.io|codesandbox\.io|render\.com|cyclic\.app|railway\.app|deno\.dev)/i',
- ),
- 'action' => 'reject',
- 'message' => 'Suspicious post.',
- 'reason' => 'Spam filter L5 (FreeHost)'
- );
- // 7. LAYER 6: Anti-Obfuscation
- $config['filters'][] = array(
- 'condition' => array(
- 'body' => '/(h\s+t\s+t\s+p|w\s+w\s+w|\bdot\s+(ru|cn|top|xyz)|\[\.\]\s*(ru|cn|top|xyz)|\(\.\)\s*(ru|cn|top|xyz)|\s\.\s(ru|cn|top|xyz))/i',
- ),
- 'action' => 'reject',
- 'message' => 'Suspicious post formatting.',
- 'reason' => 'Spam filter L6 (Obfuscation)'
- );
- // 8. LAYER 7: Sneaky Fields Scan (Subject, Name, Email)
- $spam_regex = '/(bit\.ly|tinyurl|curlmin|nimje|shrturl|goo\.su|t\.ly|\.ru|\.cn|\.top|\.xyz|\.onion|\.ws|\.pw|\.cc|\.icu|\.zip|\.in|\.site|\.online|\.website|\.space)/i';
- $config['filters'][] = array(
- 'condition' => array('subject' => $spam_regex),
- 'action' => 'reject', 'message' => 'Suspicious content.', 'reason' => 'Spam filter L7 (Subject)'
- );
- $config['filters'][] = array(
- 'condition' => array('name' => $spam_regex),
- 'action' => 'reject', 'message' => 'Suspicious content.', 'reason' => 'Spam filter L7 (Name)'
- );
- $config['filters'][] = array(
- 'condition' => array('email' => $spam_regex),
- 'action' => 'reject', 'message' => 'Suspicious content.', 'reason' => 'Spam filter L7 (Email)'
- );
- // 9. LAYER 8: Content/Keyword Blocking
- $config['filters'][] = array(
- 'condition' => array(
- 'body' => '/(megapack|secret\ssite|<<[a-z]>>)/i',
- ),
- 'action' => 'reject',
- 'message' => 'Suspicious keywords detected.',
- 'reason' => 'Spam filter L8 (Keywords)'
- );
- // 10. LAYER 9: Cloud Storage & Messaging (NEW)
- // Blocks the specific hosts usually used to store or share the content.
- $config['filters'][] = array(
- 'condition' => array(
- 'body' => '/(mega\.nz|mega\.io|mediafire\.com|dropbox\.com|t\.me|telegram\.me|discord\.gg|discordapp\.com)/i',
- ),
- 'action' => 'reject',
- 'message' => 'File hosts and chat invites are not allowed.',
- 'reason' => 'Spam filter L9 (Cloud/Chat)'
- );
- // ----------------------------------------------------------------
- // END DEFENSE SYSTEM
- // ----------------------------------------------------------------
Add Comment
Please, Sign In to add comment