kxBypass Executor Bypass [only Swift]

Bypasses Swift keysystem (works alongside kxBypass Shortlinks Bypasser)

当前为 2025-04-25 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name kxBypass Executor Bypass [only Swift]
  3. // @namespace https://discord.gg/pqEBSTqdxV
  4. // @version 1.0
  5. // @description Bypasses Swift keysystem (works alongside kxBypass Shortlinks Bypasser)
  6. // @author awaitlol.
  7. // @match https://key.getswift.gg/ks/checkpoint/*
  8. // ==/UserScript==
  9.  
  10. (function () {
  11. 'use strict';
  12.  
  13. setTimeout(() => {
  14. ['click', 'mousedown', 'mouseup'].forEach(evt => {
  15. window.addEventListener(evt, e => e.stopPropagation(), true);
  16. });
  17. document.body.onclick = null;
  18. document.documentElement.onclick = null;
  19.  
  20. const captchaWidget = document.querySelector('.captcha-area');
  21. if (!captchaWidget) {
  22. console.error('⚠️ CAPTCHA area not found.');
  23. return;
  24. }
  25.  
  26. const overlay = document.createElement('div');
  27. overlay.style.position = 'fixed';
  28. overlay.style.top = '0';
  29. overlay.style.left = '0';
  30. overlay.style.width = '100vw';
  31. overlay.style.height = '100vh';
  32. overlay.style.backgroundColor = '#000c';
  33. overlay.style.display = 'flex';
  34. overlay.style.alignItems = 'center';
  35. overlay.style.justifyContent = 'center';
  36. overlay.style.zIndex = '999999';
  37.  
  38. overlay.appendChild(captchaWidget);
  39.  
  40. const keepSet = new Set();
  41. let el = captchaWidget;
  42. while (el) {
  43. keepSet.add(el);
  44. el = el.parentElement;
  45. }
  46.  
  47. Array.from(document.body.children).forEach(child => {
  48. if (!keepSet.has(child)) {
  49. child.remove();
  50. }
  51. });
  52.  
  53. document.body.appendChild(overlay);
  54.  
  55. const checkHCaptchaLoaded = setInterval(() => {
  56. if (window.hcaptcha) {
  57. clearInterval(checkHCaptchaLoaded);
  58. startCaptchaCheck();
  59. }
  60. }, 100);
  61.  
  62. function startCaptchaCheck() {
  63. const currentUrl = window.location.href;
  64. const interval = setInterval(() => {
  65. try {
  66. const responseToken = hcaptcha.getResponse();
  67. if (responseToken) {
  68. console.log('✅ CAPTCHA solved! Token:', responseToken);
  69. clearInterval(interval);
  70.  
  71. const xsrf = document.cookie
  72. .split('; ')
  73. .find(c => c.startsWith('_xsrf='))
  74. ?.split('=')[1] || '';
  75.  
  76. const formData = new URLSearchParams();
  77. formData.append('_xsrf', xsrf);
  78. formData.append('g-recaptcha-response', responseToken);
  79. formData.append('h-captcha-response', responseToken);
  80.  
  81. const form = document.createElement('form');
  82. form.method = 'POST';
  83. form.action = currentUrl;
  84. form.style.display = 'none';
  85.  
  86. for (const [key, val] of formData.entries()) {
  87. const input = document.createElement('input');
  88. input.type = 'hidden';
  89. input.name = key;
  90. input.value = val;
  91. form.appendChild(input);
  92. }
  93.  
  94. document.body.appendChild(form);
  95. form.submit();
  96. }
  97. } catch (e) {
  98. console.error('Error checking hCaptcha:', e);
  99. clearInterval(interval);
  100. }
  101. }, 100);
  102. }
  103. }, 100);
  104. })();