Bypass Google Sorry (reCAPTCHA) / Fix

Redirect Google reCAPTCHA to new search

  1. // ==UserScript==
  2. // @name Bypass Google Sorry (reCAPTCHA) / Fix
  3. // @version 0.7.2
  4. // @description Redirect Google reCAPTCHA to new search
  5. // @author Ang Li / Beridok
  6. // @namespace beridok@gmail.com
  7. // @license MIT
  8. // @match https://www.google.com/sorry/*
  9. // @match https://www.google.ad/sorry/*
  10. // @match https://www.google.ae/sorry/*
  11. // @match https://www.google.com.af/sorry/*
  12. // @match https://www.google.com.ag/sorry/*
  13. // @match https://www.google.com.ai/sorry/*
  14. // @match https://www.google.al/sorry/*
  15. // @match https://www.google.am/sorry/*
  16. // @match https://www.google.co.ao/sorry/*
  17. // @match https://www.google.com.ar/sorry/*
  18. // @match https://www.google.as/sorry/*
  19. // @match https://www.google.at/sorry/*
  20. // @match https://www.google.com.au/sorry/*
  21. // @match https://www.google.az/sorry/*
  22. // @match https://www.google.ba/sorry/*
  23. // @match https://www.google.com.bd/sorry/*
  24. // @match https://www.google.be/sorry/*
  25. // @match https://www.google.bf/sorry/*
  26. // @match https://www.google.bg/sorry/*
  27. // @match https://www.google.com.bh/sorry/*
  28. // @match https://www.google.bi/sorry/*
  29. // @match https://www.google.bj/sorry/*
  30. // @match https://www.google.com.bn/sorry/*
  31. // @match https://www.google.com.bo/sorry/*
  32. // @match https://www.google.com.br/sorry/*
  33. // @match https://www.google.bs/sorry/*
  34. // @match https://www.google.bt/sorry/*
  35. // @match https://www.google.co.bw/sorry/*
  36. // @match https://www.google.by/sorry/*
  37. // @match https://www.google.com.bz/sorry/*
  38. // @match https://www.google.ca/sorry/*
  39. // @match https://www.google.cd/sorry/*
  40. // @match https://www.google.cf/sorry/*
  41. // @match https://www.google.cg/sorry/*
  42. // @match https://www.google.ch/sorry/*
  43. // @match https://www.google.ci/sorry/*
  44. // @match https://www.google.co.ck/sorry/*
  45. // @match https://www.google.cl/sorry/*
  46. // @match https://www.google.cm/sorry/*
  47. // @match https://www.google.cn/sorry/*
  48. // @match https://www.google.com.co/sorry/*
  49. // @match https://www.google.co.cr/sorry/*
  50. // @match https://www.google.com.cu/sorry/*
  51. // @match https://www.google.cv/sorry/*
  52. // @match https://www.google.com.cy/sorry/*
  53. // @match https://www.google.cz/sorry/*
  54. // @match https://www.google.de/sorry/*
  55. // @match https://www.google.dj/sorry/*
  56. // @match https://www.google.dk/sorry/*
  57. // @match https://www.google.dm/sorry/*
  58. // @match https://www.google.com.do/sorry/*
  59. // @match https://www.google.dz/sorry/*
  60. // @match https://www.google.com.ec/sorry/*
  61. // @match https://www.google.ee/sorry/*
  62. // @match https://www.google.com.eg/sorry/*
  63. // @match https://www.google.es/sorry/*
  64. // @match https://www.google.com.et/sorry/*
  65. // @match https://www.google.fi/sorry/*
  66. // @match https://www.google.com.fj/sorry/*
  67. // @match https://www.google.fm/sorry/*
  68. // @match https://www.google.fr/sorry/*
  69. // @match https://www.google.ga/sorry/*
  70. // @match https://www.google.ge/sorry/*
  71. // @match https://www.google.gg/sorry/*
  72. // @match https://www.google.com.gh/sorry/*
  73. // @match https://www.google.com.gi/sorry/*
  74. // @match https://www.google.gl/sorry/*
  75. // @match https://www.google.gm/sorry/*
  76. // @match https://www.google.gr/sorry/*
  77. // @match https://www.google.com.gt/sorry/*
  78. // @match https://www.google.gy/sorry/*
  79. // @match https://www.google.com.hk/sorry/*
  80. // @match https://www.google.hn/sorry/*
  81. // @match https://www.google.hr/sorry/*
  82. // @match https://www.google.ht/sorry/*
  83. // @match https://www.google.hu/sorry/*
  84. // @match https://www.google.co.id/sorry/*
  85. // @match https://www.google.ie/sorry/*
  86. // @match https://www.google.co.il/sorry/*
  87. // @match https://www.google.im/sorry/*
  88. // @match https://www.google.co.in/sorry/*
  89. // @match https://www.google.iq/sorry/*
  90. // @match https://www.google.is/sorry/*
  91. // @match https://www.google.it/sorry/*
  92. // @match https://www.google.je/sorry/*
  93. // @match https://www.google.com.jm/sorry/*
  94. // @match https://www.google.jo/sorry/*
  95. // @match https://www.google.co.jp/sorry/*
  96. // @match https://www.google.co.ke/sorry/*
  97. // @match https://www.google.com.kh/sorry/*
  98. // @match https://www.google.ki/sorry/*
  99. // @match https://www.google.kg/sorry/*
  100. // @match https://www.google.co.kr/sorry/*
  101. // @match https://www.google.com.kw/sorry/*
  102. // @match https://www.google.kz/sorry/*
  103. // @match https://www.google.la/sorry/*
  104. // @match https://www.google.com.lb/sorry/*
  105. // @match https://www.google.li/sorry/*
  106. // @match https://www.google.lk/sorry/*
  107. // @match https://www.google.co.ls/sorry/*
  108. // @match https://www.google.lt/sorry/*
  109. // @match https://www.google.lu/sorry/*
  110. // @match https://www.google.lv/sorry/*
  111. // @match https://www.google.com.ly/sorry/*
  112. // @match https://www.google.co.ma/sorry/*
  113. // @match https://www.google.md/sorry/*
  114. // @match https://www.google.me/sorry/*
  115. // @match https://www.google.mg/sorry/*
  116. // @match https://www.google.mk/sorry/*
  117. // @match https://www.google.ml/sorry/*
  118. // @match https://www.google.com.mm/sorry/*
  119. // @match https://www.google.mn/sorry/*
  120. // @match https://www.google.ms/sorry/*
  121. // @match https://www.google.com.mt/sorry/*
  122. // @match https://www.google.mu/sorry/*
  123. // @match https://www.google.mv/sorry/*
  124. // @match https://www.google.mw/sorry/*
  125. // @match https://www.google.com.mx/sorry/*
  126. // @match https://www.google.com.my/sorry/*
  127. // @match https://www.google.co.mz/sorry/*
  128. // @match https://www.google.com.na/sorry/*
  129. // @match https://www.google.com.ng/sorry/*
  130. // @match https://www.google.com.ni/sorry/*
  131. // @match https://www.google.ne/sorry/*
  132. // @match https://www.google.nl/sorry/*
  133. // @match https://www.google.no/sorry/*
  134. // @match https://www.google.com.np/sorry/*
  135. // @match https://www.google.nr/sorry/*
  136. // @match https://www.google.nu/sorry/*
  137. // @match https://www.google.co.nz/sorry/*
  138. // @match https://www.google.com.om/sorry/*
  139. // @match https://www.google.com.pa/sorry/*
  140. // @match https://www.google.com.pe/sorry/*
  141. // @match https://www.google.com.pg/sorry/*
  142. // @match https://www.google.com.ph/sorry/*
  143. // @match https://www.google.com.pk/sorry/*
  144. // @match https://www.google.pl/sorry/*
  145. // @match https://www.google.pn/sorry/*
  146. // @match https://www.google.com.pr/sorry/*
  147. // @match https://www.google.ps/sorry/*
  148. // @match https://www.google.pt/sorry/*
  149. // @match https://www.google.com.py/sorry/*
  150. // @match https://www.google.com.qa/sorry/*
  151. // @match https://www.google.ro/sorry/*
  152. // @match https://www.google.ru/sorry/*
  153. // @match https://www.google.rw/sorry/*
  154. // @match https://www.google.com.sa/sorry/*
  155. // @match https://www.google.com.sb/sorry/*
  156. // @match https://www.google.sc/sorry/*
  157. // @match https://www.google.se/sorry/*
  158. // @match https://www.google.com.sg/sorry/*
  159. // @match https://www.google.sh/sorry/*
  160. // @match https://www.google.si/sorry/*
  161. // @match https://www.google.sk/sorry/*
  162. // @match https://www.google.com.sl/sorry/*
  163. // @match https://www.google.sn/sorry/*
  164. // @match https://www.google.so/sorry/*
  165. // @match https://www.google.sm/sorry/*
  166. // @match https://www.google.sr/sorry/*
  167. // @match https://www.google.st/sorry/*
  168. // @match https://www.google.com.sv/sorry/*
  169. // @match https://www.google.td/sorry/*
  170. // @match https://www.google.tg/sorry/*
  171. // @match https://www.google.co.th/sorry/*
  172. // @match https://www.google.com.tj/sorry/*
  173. // @match https://www.google.tl/sorry/*
  174. // @match https://www.google.tm/sorry/*
  175. // @match https://www.google.tn/sorry/*
  176. // @match https://www.google.to/sorry/*
  177. // @match https://www.google.com.tr/sorry/*
  178. // @match https://www.google.tt/sorry/*
  179. // @match https://www.google.com.tw/sorry/*
  180. // @match https://www.google.co.tz/sorry/*
  181. // @match https://www.google.com.ua/sorry/*
  182. // @match https://www.google.co.ug/sorry/*
  183. // @match https://www.google.co.uk/sorry/*
  184. // @match https://www.google.com.uy/sorry/*
  185. // @match https://www.google.co.uz/sorry/*
  186. // @match https://www.google.com.vc/sorry/*
  187. // @match https://www.google.co.ve/sorry/*
  188. // @match https://www.google.vg/sorry/*
  189. // @match https://www.google.co.vi/sorry/*
  190. // @match https://www.google.com.vn/sorry/*
  191. // @match https://www.google.vu/sorry/*
  192. // @match https://www.google.ws/sorry/*
  193. // @match https://www.google.rs/sorry/*
  194. // @match https://www.google.co.za/sorry/*
  195. // @match https://www.google.co.zm/sorry/*
  196. // @match https://www.google.co.zw/sorry/*
  197. // @match https://www.google.cat/sorry/*
  198. // @grant none
  199. // @run-at document-start
  200. // ==/UserScript==
  201.  
  202. var immediatelyReplace = false; //If false, use delayed attempts...
  203. var delay = 1500;
  204. //var delay = 2*60*1000;
  205.  
  206. console.info('%c «%s» %c—— %c %s ',
  207. 'background:#000000; color:#7ebe45', GM_info.script.name,
  208. 'background:#000000; color:dimgray',
  209. 'background:#3c424d; color:#ffffff', GM_info.script.version);
  210.  
  211. function getParameterByName(name, url) {
  212. if (!url) url = window.location.href;
  213. name = name.replace(/[\[\]]/g, "\\$&");
  214. var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
  215. results = regex.exec(url);
  216. if (!results) return null;
  217. if (!results[2]) return '';
  218. return decodeURIComponent(results[2].replace(/\+/g, " "));
  219. }
  220.  
  221. function getURLfromErrorText(){
  222. var fullURLText = document.querySelector('body > div:nth-child(1) > div:nth-child(5)').children[10].previousSibling.textContent;
  223. fullURLText = fullURLText.split("Adres URL: ")[1].split("&sec_act")[0]
  224. return fullURLText
  225. }
  226.  
  227. function getRandomGoogleURL() {
  228. var newURL;
  229. var n = Math.floor(Math.random()*listOfGoogleDomains.length);
  230. newURL = "https://www"+listOfGoogleDomains[n]+"/search?q=";
  231. return newURL;
  232. }
  233.  
  234. (function() {
  235. 'use strict';
  236. var googleSorryUrl = decodeURIComponent(window.location.href);
  237. var targetDomain = getParameterByName('continue', googleSorryUrl);
  238. //if(targetDomain.match("google")){
  239. if(targetDomain.match("google")){
  240. if ( immediatelyReplace === true ) {
  241. window.location.replace(getRandomGoogleURL() + getParameterByName('q', googleSorryUrl));
  242. }
  243. else {
  244. setTimeout(() => {
  245. //var newURL = decodeURIComponent(window.location.href).split('continue=')[1];
  246. //window.location = newURL;
  247. window.location.replace(getRandomGoogleURL() + getParameterByName('q', googleSorryUrl));
  248. }, delay)
  249. }
  250. }
  251. else {
  252. if ( immediatelyReplace === true ) {
  253. var newURL = decodeURIComponent(window.location.href).split('continue=')[1];
  254. window.location = newURL;
  255. }
  256. else {
  257. setTimeout(() => {
  258. var newURL = decodeURIComponent(window.location.href).split('continue=')[1];
  259. window.location = newURL;
  260. }, delay)
  261. }
  262. }
  263. })();
  264.  
  265. var listOfGoogleDomains = [".google.com",
  266. ".google.ad",
  267. ".google.ae",
  268. ".google.com.af",
  269. ".google.com.ag",
  270. ".google.com.ai",
  271. ".google.al",
  272. ".google.am",
  273. ".google.co.ao",
  274. ".google.com.ar",
  275. ".google.as",
  276. ".google.at",
  277. ".google.com.au",
  278. ".google.az",
  279. ".google.ba",
  280. ".google.com.bd",
  281. ".google.be",
  282. ".google.bf",
  283. ".google.bg",
  284. ".google.com.bh",
  285. ".google.bi",
  286. ".google.bj",
  287. ".google.com.bn",
  288. ".google.com.bo",
  289. ".google.com.br",
  290. ".google.bs",
  291. ".google.bt",
  292. ".google.co.bw",
  293. ".google.by",
  294. ".google.com.bz",
  295. ".google.ca",
  296. ".google.cd",
  297. ".google.cf",
  298. ".google.cg",
  299. ".google.ch",
  300. ".google.ci",
  301. ".google.co.ck",
  302. ".google.cl",
  303. ".google.cm",
  304. ".google.cn",
  305. ".google.com.co",
  306. ".google.co.cr",
  307. ".google.com.cu",
  308. ".google.cv",
  309. ".google.com.cy",
  310. ".google.cz",
  311. ".google.de",
  312. ".google.dj",
  313. ".google.dk",
  314. ".google.dm",
  315. ".google.com.do",
  316. ".google.dz",
  317. ".google.com.ec",
  318. ".google.ee",
  319. ".google.com.eg",
  320. ".google.es",
  321. ".google.com.et",
  322. ".google.fi",
  323. ".google.com.fj",
  324. ".google.fm",
  325. ".google.fr",
  326. ".google.ga",
  327. ".google.ge",
  328. ".google.gg",
  329. ".google.com.gh",
  330. ".google.com.gi",
  331. ".google.gl",
  332. ".google.gm",
  333. ".google.gr",
  334. ".google.com.gt",
  335. ".google.gy",
  336. ".google.com.hk",
  337. ".google.hn",
  338. ".google.hr",
  339. ".google.ht",
  340. ".google.hu",
  341. ".google.co.id",
  342. ".google.ie",
  343. ".google.co.il",
  344. ".google.im",
  345. ".google.co.in",
  346. ".google.iq",
  347. ".google.is",
  348. ".google.it",
  349. ".google.je",
  350. ".google.com.jm",
  351. ".google.jo",
  352. ".google.co.jp",
  353. ".google.co.ke",
  354. ".google.com.kh",
  355. ".google.ki",
  356. ".google.kg",
  357. ".google.co.kr",
  358. ".google.com.kw",
  359. ".google.kz",
  360. ".google.la",
  361. ".google.com.lb",
  362. ".google.li",
  363. ".google.lk",
  364. ".google.co.ls",
  365. ".google.lt",
  366. ".google.lu",
  367. ".google.lv",
  368. ".google.com.ly",
  369. ".google.co.ma",
  370. ".google.md",
  371. ".google.me",
  372. ".google.mg",
  373. ".google.mk",
  374. ".google.ml",
  375. ".google.com.mm",
  376. ".google.mn",
  377. ".google.ms",
  378. ".google.com.mt",
  379. ".google.mu",
  380. ".google.mv",
  381. ".google.mw",
  382. ".google.com.mx",
  383. ".google.com.my",
  384. ".google.co.mz",
  385. ".google.com.na",
  386. ".google.com.ng",
  387. ".google.com.ni",
  388. ".google.ne",
  389. ".google.nl",
  390. ".google.no",
  391. ".google.com.np",
  392. ".google.nr",
  393. ".google.nu",
  394. ".google.co.nz",
  395. ".google.com.om",
  396. ".google.com.pa",
  397. ".google.com.pe",
  398. ".google.com.pg",
  399. ".google.com.ph",
  400. ".google.com.pk",
  401. ".google.pl",
  402. ".google.pn",
  403. ".google.com.pr",
  404. ".google.ps",
  405. ".google.pt",
  406. ".google.com.py",
  407. ".google.com.qa",
  408. ".google.ro",
  409. ".google.ru",
  410. ".google.rw",
  411. ".google.com.sa",
  412. ".google.com.sb",
  413. ".google.sc",
  414. ".google.se",
  415. ".google.com.sg",
  416. ".google.sh",
  417. ".google.si",
  418. ".google.sk",
  419. ".google.com.sl",
  420. ".google.sn",
  421. ".google.so",
  422. ".google.sm",
  423. ".google.sr",
  424. ".google.st",
  425. ".google.com.sv",
  426. ".google.td",
  427. ".google.tg",
  428. ".google.co.th",
  429. ".google.com.tj",
  430. ".google.tl",
  431. ".google.tm",
  432. ".google.tn",
  433. ".google.to",
  434. ".google.com.tr",
  435. ".google.tt",
  436. ".google.com.tw",
  437. ".google.co.tz",
  438. ".google.com.ua",
  439. ".google.co.ug",
  440. ".google.co.uk",
  441. ".google.com.uy",
  442. ".google.co.uz",
  443. ".google.com.vc",
  444. ".google.co.ve",
  445. ".google.vg",
  446. ".google.co.vi",
  447. ".google.com.vn",
  448. ".google.vu",
  449. ".google.ws",
  450. ".google.rs",
  451. ".google.co.za",
  452. ".google.co.zm",
  453. ".google.co.zw",
  454. ".google.cat"
  455. ]