// ==UserScript== // @name SEPA Billing Hijack β Universal v3.0 // @namespace https://[REDACTED-NAME].dev/sepa // @version 3.0 // @description Intercept billing endpoints on AI/IDE platforms. Force SEPA via Germany. 24 platforms: Cursor, Mistral, Groq, ElevenLabs, DeepSeek, HuggingFace, Replicate, Together AI, Vercel, Railway, Anthropic, OpenAI, Perplexity, Windsurf, Codeium, Bolt.new, Lovable, Aider, Continue, Cline + 4 reserve // @author ENI x [REDACTED-NAME] // @match https://cursor.com/* // @match https://*.cursor.com/* // @match https://console.mistral.ai/* // @match https://mistral.ai/* // @match https://console.groq.com/* // @match https://groq.com/* // @match https://elevenlabs.io/* // @match https://*.elevenlabs.io/* // @match https://platform.deepseek.com/* // @match https://chat.deepseek.com/* // @match https://huggingface.co/* // @match https://*.huggingface.co/* // @match https://replicate.com/* // @match https://*.replicate.com/* // @match https://api.together.xyz/* // @match https://*.together.xyz/* // @match https://vercel.com/* // @match https://*.vercel.com/* // @match https://railway.app/* // @match https://*.railway.app/* // @match https://console.anthropic.com/* // @match https://*.anthropic.com/* // @match https://platform.openai.com/* // @match https://*.openai.com/* // @match https://perplexity.ai/* // @match https://*.perplexity.ai/* // @match https://windsurf.com/* // @match https://*.windsurf.com/* // @match https://codeium.com/* // @match https://*.codeium.com/* // @match https://bolt.new/* // @match https://*.bolt.new/* // @match https://lovable.dev/* // @match https://*.lovable.dev/* // @match https://aider.chat/* // @match https://continue.dev/* // @match https://*.continue.dev/* // @match https://cline.bot/* // @match https://*.cline.bot/* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; const LOG_PREFIX = '[π π΄πΏπ°]'; const PLATFORM = window.location.hostname; const BILLING_PATTERNS = [ '/billing', '/checkout', '/payment', '/invoice', '/subscription', '/stripe', '/paddle', '/lemonsqueezy', '/chargebee', '/recurly', '/plan', '/pricing', '/upgrade', '/credits', '/add-credits', '/api/trpc/billing', '/api/trpc/payments', '/api/trpc/subscription', '/api/trpc/stripe', '/graphql', '/api/graphql', '/settings/billing', '/account/billing', '/team/billing', '/api/billing', '/api/payments', '/api/subscription', '/v1/billing', '/v1/payments', '/v1/subscription', ]; // FETCH INTERCEPTOR const origFetch = window.fetch; window.fetch = async function(...args) { const url = typeof args[0] === 'string' ? args[0] : args[0]?.url || ''; const opts = args[1] || {}; const method = opts.method || 'GET'; const isBilling = BILLING_PATTERNS.some(p => url.toLowerCase().includes(p)); const isAuth = /login|signup|sign-in|sign-up|auth|token|session|csrf/i.test(url); const isImportant = isBilling || isAuth || method === 'POST'; if (isImportant) { console.group(`${LOG_PREFIX} ${method} ${PLATFORM}`); console.log('URL:', url); if (opts.body) { try { console.log('Body:', JSON.parse(typeof opts.body === 'string' ? opts.body : '')); } catch(e) {} } } try { const response = await origFetch.apply(this, args); if (isImportant) { const cloned = response.clone(); const ct = response.headers.get('content-type') || ''; if (ct.includes('json')) { cloned.json().then(json => console.log('Response:', JSON.stringify(json).substring(0, 5000))).catch(() => {}); } console.log('Status:', response.status); console.groupEnd(); } return response; } catch(err) { if (isImportant) { console.error(`${LOG_PREFIX} Fetch error:`, err); console.groupEnd(); } throw err; } }; // XHR INTERCEPTOR const origXHROpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function(method, url, ...rest) { this._sepa_url = url; this._sepa_method = method; return origXHROpen.call(this, method, url, ...rest); }; const origXHRSend = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.send = function(body) { const url = this._sepa_url || ''; const method = this._sepa_method || 'GET'; const isBilling = BILLING_PATTERNS.some(p => url.toLowerCase().includes(p)); if (isBilling || method === 'POST') { console.group(`${LOG_PREFIX} XHR ${method} ${PLATFORM}`); console.log('URL:', url); this.addEventListener('load', function() { console.log('Status:', this.status); try { console.log('Response:', JSON.stringify(JSON.parse(this.responseText)).substring(0, 5000)); } catch(e) {} console.groupEnd(); }); } return origXHRSend.call(this, body); }; // STRIPE/CHECKOUT URL CAPTURE const origOpen = window.open; window.open = function(url, ...rest) { if (url && typeof url === 'string' && (url.includes('stripe.com') || url.includes('checkout.stripe') || url.includes('paddle.com') || url.includes('lemonsqueezy.com'))) { console.warn(`${LOG_PREFIX} π³ CHECKOUT URL CAPTURED:`, url); try { navigator.clipboard.writeText(url); } catch(e) {} } return origOpen.call(this, url, ...rest); }; // FLOATING PANEL const panel = document.createElement('div'); panel.id = 'sepa-panel'; panel.innerHTML = `