Bypass FileCrypt

Bypass FileCrypt and get the original link! Try this version first. If Bypass FileCrypt shows a "2" in the page and doesn't redirect to the final page, then remove this script and try Bypass FileCrypt (XHR) instead.

当前为 2022-12-10 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Bypass FileCrypt
  3. // @name:it Bypassa FileCrypt
  4. // @namespace StephenP
  5. // @version 1.3.8
  6. // @description Bypass FileCrypt and get the original link! Try this version first. If Bypass FileCrypt shows a "2" in the page and doesn't redirect to the final page, then remove this script and try Bypass FileCrypt (XHR) instead.
  7. // @description:it Bypassa Filecrypt e ottieni il collegamento originale! Prova prima questa versione. Se Bypass Filecrypt mostra un "2" nella pagina e non reindirizza alla destinazione finale, allora rimuovi questo script e prova Bypass Filecrypt (XHR) al suo posto.
  8. // @author StephenP
  9. // @grant GM.xmlHttpRequest
  10. // @match http://filecrypt.cc/*
  11. // @match http://www.filecrypt.cc/*
  12. // @match http://filecrypt.co/*
  13. // @match http://www.filecrypt.co/*
  14. // @match https://filecrypt.cc/*
  15. // @match https://www.filecrypt.cc/*
  16. // @match https://filecrypt.co/*
  17. // @match https://www.filecrypt.co/*
  18. // @run-at document-end
  19. // @connect dcrypt.it
  20. // @connect self
  21. // @contributionURL https://nowpayments.io/donation/stephenpgreasyfork
  22. // ==/UserScript==
  23. (function () {
  24. var usenetAd=document.getElementsByTagName('A');//come on, why should anyone pay for access to pirated content?
  25. for(var i=0;i<usenetAd.length;i++){
  26. if(usenetAd[i].href.includes('/pink/')){
  27. usenetAd[i].parentNode.remove();
  28. i=usenetAd.length;
  29. }
  30. }
  31. let st=document.createElement("STYLE");
  32. st.textContent=".window:after{z-index: -1;}";
  33. document.getElementsByTagName("HEAD")[0].appendChild(st);
  34. if(document.location.href.includes("/Link/")){
  35. getSingleLink();
  36. }
  37. else if(document.location.href.includes("/Container/")){
  38. let art=document.getElementsByClassName("download")[0].parentNode.parentNode.parentNode.parentNode;
  39. let load=document.createElement("DIV");
  40. load.id="dcryptLoadMsg";
  41. load.style.marginBottom="2em";
  42. load.textContent="Loading decrypted links list from dcrypt.it...";
  43. art.parentNode.insertBefore(load,art);
  44. getCNL();
  45. }
  46. })();
  47. function getSingleLink(){
  48. if(document.body.getElementsByTagName("SCRIPT").length==0){
  49. window.stop();
  50. if(body.children.length>0){
  51. const a=document.body.innerHTML.lastIndexOf("http");
  52. top.location.href=document.body.innerHTML.substring(a,document.body.innerHTML.indexOf('id=',a)+43).replace('&amp;', '&');
  53. }
  54. else{
  55. GM.xmlHttpRequest({
  56. method: "GET",
  57. url: document.location.href,
  58. onload: function(response) {
  59. const a=response.responseText.lastIndexOf("http");
  60. top.location.href=response.responseText.substring(a,response.responseText.indexOf('id=',a)+43);
  61. }
  62. });
  63. }
  64. }
  65. }
  66. function getCNL(){
  67. var dlcButton=document.getElementsByClassName("dlcdownload");
  68. if(dlcButton.length>0){
  69. var inputs=document.getElementsByTagName('INPUT');
  70. var dlcId;
  71. /*for(var i=0;i<inputs.length;i++){
  72. if(inputs[i].getAttribute('name')=='hidden_cnl_id'){
  73. dlcId=inputs[i].getAttribute('value');
  74. i=inputs.length;
  75. }
  76. }*/ //left for reference
  77. dlcId=document.getElementsByClassName("dlcdownload")[0].attributes["onclick"].nodeValue.split('\'')[1];
  78. //console.log('dlcId='+dlcId);
  79. GM.xmlHttpRequest({
  80. method: "GET",
  81. url: "https://"+document.location.hostname+"/DLC/"+dlcId+".dlc",
  82. onload: function(response) {
  83. dcrypt(response.responseText);
  84. },
  85. onerror: function(response) {
  86. }
  87. });
  88. }
  89. else{
  90. document.getElementById("dcryptLoadMsg").textContent="No DLC file is available for bulk download. You'll have to click on the download buttons to retrieve the links. This operation isn't currently automated by Bypass FileCrypt script.";
  91. document.getElementById("dcryptLoadMsg").style.color="red";
  92. }
  93. }
  94. function dcrypt(content){
  95. //console.log(content);
  96. GM.xmlHttpRequest({
  97. method: "POST",
  98. url: "http://dcrypt.it/decrypt/paste",
  99. headers: {
  100. "Content-Type": "application/x-www-form-urlencoded"
  101. },
  102. data: "content="+encodeURIComponent(content),
  103. onload: function(response) {
  104. //console.log(response);
  105. var obj=JSON.parse(response.response);
  106. //console.log(obj);
  107. var finalLinksDiv=document.createElement("DIV");
  108. finalLinksDiv.style.backgroundColor="white";
  109. finalLinksDiv.style.borderRadius="10px";
  110. finalLinksDiv.style.padding="1em";
  111. finalLinksDiv.style.marginTop="1em";
  112. finalLinksDiv.style.color="black";
  113. let a=document.createElement("SPAN");
  114. a.textContent="Decrypted links:";
  115. finalLinksDiv.appendChild(a);
  116. finalLinksDiv.appendChild(document.createElement("BR"));
  117. finalLinksDiv.appendChild(document.createElement("BR"));
  118. try{
  119. for (var link of obj.success.links) {
  120. console.log(link);
  121. let b=document.createElement("A");
  122. b.textContent=link;
  123. b.href=link;
  124. finalLinksDiv.appendChild(b);
  125. finalLinksDiv.appendChild(document.createElement("BR"));
  126. }
  127. }
  128. catch(e){
  129. console.log(e);
  130. document.getElementById("dcryptLoadMsg").textContent="Error while reading the decrypted links from dcrypt.it. You can still use the single uncrypted links below.";
  131. }
  132. console.log(finalLinksDiv);
  133. document.getElementById("dcryptLoadMsg").replaceWith(finalLinksDiv);
  134. //Do you like it now? It's not hidden anymore :P
  135. const config = { attributes: true, childList: false, subtree: false };
  136. const callback = function(mutationList, observer) {
  137. for (const mutation of mutationList) {
  138. console.log(mutation);
  139. mutation.target.removeAttribute(mutation.attributeName);
  140. }
  141. };
  142. const observer = new MutationObserver(callback);
  143. observer.observe(finalLinksDiv, config);
  144. //
  145. },
  146. onerror: function(response) {
  147. document.getElementById("dcryptLoadMsg").textContent="Error while retrieving the links from dcrypt.it. You can still use the single uncrypted links below.";
  148. }
  149. });
  150. }