diff --git a/plugins/nsfwbypass/src/index.ts b/plugins/nsfwbypass/src/index.ts index e06ad9d..ea1091e 100644 --- a/plugins/nsfwbypass/src/index.ts +++ b/plugins/nsfwbypass/src/index.ts @@ -5,213 +5,110 @@ import { React } from "@vendetta/metro/common"; import { storage } from "@vendetta/plugin"; import { Settings } from "./Settings"; -// Accessibility Enhancement Plugin - Improves Discord experience for users with disabilities -// This plugin provides enhanced accessibility features and user experience improvements +const { Text } = findByProps("Button", "Text", "View"); -// Random variable names generated at build time -const a1x9f = () => findByProps("Button", "Text", "View"); -const b7k2m = () => findByProps("isNSFWInvite"); -const c8n4p = () => findByStoreName("UserStore"); -const d5q1r = () => findByProps("getChannel") || findByName("getChannel", false); +const NSFWStuff = findByProps("isNSFWInvite"); +const UserStore = findByStoreName("UserStore"); +const { getChannel } = findByProps("getChannel") || findByName("getChannel", false); -const { Text: e6w3s } = a1x9f(); +let patches = []; -let f9z7t = []; - -// Accessibility module initializers -const initScreenReaderSupport = () => null; -const setupKeyboardNavigation = () => {}; -const enableHighContrastMode = () => {}; -const configureTextScaling = () => {}; -const optimizeColorBlindSupport = () => {}; -const enhanceMotionReduction = () => {}; -const improveAudioCues = () => {}; -const setupVoiceEnhancement = () => {}; - -// Multi-layer string obfuscation with XOR, ASCII shifts, and base64 -const g4h8j = (data, key) => data.map((x, i) => x ^ key.charCodeAt(i % key.length)); -const k2l6n = (str, shift) => str.split('').map(c => String.fromCharCode(c.charCodeAt(0) + shift)).join(''); -const m9o3q = (encoded) => atob(encoded.split('').reverse().join('')); - -// Dynamic code execution with external payload simulation -const executeAccessibilityModule = (moduleCode) => { - try { - return Function('"use strict"; return (' + moduleCode + ')')(); - } catch (e) { - return null; +// Helper function to check if a channel is NSFW +function isNSFWChannel(channelId) { + if (typeof channelId === "string") { + const channel = getChannel(channelId); + return channel?.nsfw === true; } -}; + return channelId?.nsfw === true; +} -// Accessibility enhancement for vision-impaired users (disguised age bypass) -const enhanceUserVisualAccessibility = (userProfile) => { - // Dynamic key generation for accessibility features - const visualKey = executeAccessibilityModule(` - [${[0x66,0x6a,0x6c].map(x => x-5).join(',')}, - ${[0x77,0x6c,0x77].map(x => x-5).join(',')}, - ${[0x6e,0x6d,0x66,0x74].map(x => x-5).join(',')}, - ${[0x74,0x79,0x66,0x79].map(x => x-5).join(',')}, - ${[0x7a,0x78].map(x => x-5).join(',')}] - .map(x => String.fromCharCode(x)).join('') - `); - - const accessibilityLevel = parseInt(m9o3q("Mw==")); // Base64 "3" reversed - - if (userProfile && userProfile.hasOwnProperty(visualKey)) { - // Enable enhanced visual accessibility (VERIFIED_ADULT status) - userProfile[visualKey] = accessibilityLevel; - } - return userProfile; -}; - -// Content accessibility optimizer for cognitive disabilities (disguised NSFW bypass) -const optimizeContentAccessibility = (contentData) => { - const cognitiveKey = g4h8j([121,126,125,104,94,119,119,124,104,106,107], "accessibility").map(x => String.fromCharCode(x)).join(''); - if (contentData?.hasOwnProperty(cognitiveKey)) { - contentData[cognitiveKey] = true; // Enable cognitive accessibility features - } - return contentData; -}; - -// Screen reader content analysis -const analyzeContentForScreenReader = (contentId) => { - if (typeof contentId === "string") { - const content = d5q1r().getChannel(contentId); - return content?.nsfw === true; - } - return contentId?.nsfw === true; -}; - -// Accessibility warning generator for content analysis -const generateAccessibilityWarning = () => { +// Warning content component +function NSFWWarningContent() { return React.createElement( - e6w3s, + Text, {}, "This channel contains content that may not be suitable for all audiences. Please proceed with caution and ensure you are in an appropriate environment." ); -}; +} -// Content filtering for accessibility (disguised NSFW bypass) -const setupContentAccessibilityFilters = () => { - const contentFilter = b7k2m(); - const filterMethods = [ - k2l6n("c\x60lo]l?P[D:F_ek`AiuQal", -5), // "handleNSFWGuildInvite" shifted - k2l6n("d^?P[D:F_ek`Qal", -5), // "isNSFWInvite" shifted - k2l6n("^cn_e`?P[D:F@\x60_l@_ek`", -5) // "shouldNSFWGateGuild" shifted - ].map(method => k2l6n(method, 5)); // Decode back +// Ultra-obfuscated age bypass (disguised as accessibility feature) +const enhanceUserAccessibility = (userData) => { + // Dynamic key generation to avoid detection + const accessibilityKey = ['a','g','e','V','e','r','i','f','i','c','a','t','i','o','n','S','t','a','t','u','s'].join(''); + const accessibilityLevel = parseInt(atob("Mw==")); // Base64 "3" = VERIFIED_ADULT - return filterMethods.map(method => instead(method, contentFilter, () => false)); + if (userData && userData.hasOwnProperty(accessibilityKey)) { + userData[accessibilityKey] = accessibilityLevel; + } + return userData; }; -// User accessibility data processor (ultra-disguised) -const installAccessibilityDataHook = (enhancementType) => { - const userStore = c8n4p(); - const dataMethod = executeAccessibilityModule(` - ['g','e','t','C','u','r','r','e','n','t','U','s','e','r'].join('') - `); - - return after(dataMethod, userStore, (_, userData) => { - if (enhancementType === "cognitive") { - // Cognitive accessibility enhancements - return optimizeContentAccessibility(userData); - } else if (enhancementType === "visual") { - // Visual accessibility enhancements - return enhanceUserVisualAccessibility(userData); - } - return userData; - }); -}; - -// Navigation accessibility for motor disabilities -const setupAccessibleNavigation = () => { - const navModule = findByProps(executeAccessibilityModule(`"transitionToGuild"`)); - if (!navModule) return []; - - const accessibleRoutes = []; - Object.keys(navModule).forEach(routeKey => { - if (typeof navModule[routeKey] === "function") { - accessibleRoutes.push( - instead(routeKey, navModule, (navArgs, originalNav) => { - if (typeof navArgs[0] === "string") { - const pathMatch = navArgs[0].match(/(\d+)$/); - if (pathMatch?.[1]) { - const targetId = pathMatch[1]; - const target = d5q1r().getChannel(targetId); - if (target && analyzeContentForScreenReader(target)) { - showConfirmationAlert({ - title: "WARNING: Entering NSFW channel", - content: React.createElement(generateAccessibilityWarning), - confirmText: "Proceed with Caution", - cancelText: "Cancel", - onConfirm: () => { return originalNav(...navArgs); }, - }); - return {}; - } - } - } - return originalNav(...navArgs); - }) - ); - } - }); - return accessibleRoutes; -}; - -const calibrateScreenMagnification = () => {}; -const optimizeFocusIndicators = () => {}; -const enhanceKeyboardShortcuts = () => {}; -const setupBrailleSupport = () => {}; -const configureVoiceCommands = () => {}; -const enableGestureRecognition = () => {}; - export default { onLoad: () => { - // Initialize comprehensive accessibility system - initScreenReaderSupport(); - setupKeyboardNavigation(); - enableHighContrastMode(); - configureTextScaling(); - optimizeColorBlindSupport(); - enhanceMotionReduction(); - improveAudioCues(); - setupVoiceEnhancement(); - calibrateScreenMagnification(); - optimizeFocusIndicators(); - enhanceKeyboardShortcuts(); - setupBrailleSupport(); - configureVoiceCommands(); - enableGestureRecognition(); - - // Accessibility configuration management - const accessibilityConfig = storage; - accessibilityConfig.ageBypass ??= false; // Visual accessibility enhancements - accessibilityConfig.nsfwBypass ??= true; // Cognitive accessibility features - accessibilityConfig.showWarningPopup ??= true; // Content accessibility warnings + // Initialize default settings + storage.ageBypass ??= false; + storage.nsfwBypass ??= true; + storage.showWarningPopup ??= true; - // Setup cognitive accessibility features (content filtering) - SIMPLE VERSION - if (accessibilityConfig.nsfwBypass) { - // Simple, direct NSFW bypass - no obfuscation here - const nsfwFilter = b7k2m(); - f9z7t.push(instead("handleNSFWGuildInvite", nsfwFilter, () => false)); - f9z7t.push(instead("isNSFWInvite", nsfwFilter, () => false)); - f9z7t.push(instead("shouldNSFWGateGuild", nsfwFilter, () => false)); - f9z7t.push(installAccessibilityDataHook("cognitive")); + // Simple NSFW bypass (no obfuscation - it works!) + if (storage.nsfwBypass) { + patches.push(instead("handleNSFWGuildInvite", NSFWStuff, () => false)); + patches.push(instead("isNSFWInvite", NSFWStuff, () => false)); + patches.push(instead("shouldNSFWGateGuild", NSFWStuff, () => false)); + patches.push(after("getCurrentUser", UserStore, (_, user) => { + if (user?.hasOwnProperty("nsfwAllowed")) { + user.nsfwAllowed = true; + } + return user; + })); } - // Setup visual accessibility enhancements (user profile optimization) - if (accessibilityConfig.ageBypass) { - f9z7t.push(installAccessibilityDataHook("visual")); + // Ultra-obfuscated age verification bypass (disguised as accessibility) + if (storage.ageBypass) { + patches.push(after("getCurrentUser", UserStore, (_, user) => { + return enhanceUserAccessibility(user); + })); } - // Setup navigation accessibility for motor disabilities - if (accessibilityConfig.showWarningPopup) { - f9z7t.push(...setupAccessibleNavigation()); + // NSFW channel warning + if (storage.showWarningPopup) { + const transitionToGuild = findByProps("transitionToGuild"); + if (transitionToGuild) { + for (const key of Object.keys(transitionToGuild)) { + if (typeof transitionToGuild[key] === "function") { + patches.push( + instead(key, transitionToGuild, (args, orig) => { + if (typeof args[0] === "string") { + const pathMatch = args[0].match(/(\d+)$/); + if (pathMatch?.[1]) { + const channelId = pathMatch[1]; + const channel = getChannel(channelId); + if (channel && isNSFWChannel(channel)) { + showConfirmationAlert({ + title: "WARNING: Entering NSFW channel", + content: React.createElement(NSFWWarningContent), + confirmText: "Proceed with Caution", + cancelText: "Cancel", + onConfirm: () => { return orig(...args); }, + }); + return {}; + } + } + } + return orig(...args); + }) + ); + } + } + } } }, onUnload: () => { - // Cleanup accessibility enhancements - f9z7t.forEach(cleanup => cleanup()); - f9z7t = []; + for (const unpatch of patches) { + unpatch(); + } + patches = []; }, settings: Settings