Greasy Fork is available in English.

Bypass FileCrypt

Bypass FileCrypt and get the original link!

Instali tiun ĉi skripton?
Author's suggested script

You may also like Bypass FileCrypt (XHR).

Instali tiun ĉi skripton
  1. // ==UserScript==
  2. // @name Bypass FileCrypt
  3. // @name:it Bypassa FileCrypt
  4. // @namespace StephenP
  5. // @version 1.4.0.5
  6. // @description Bypass FileCrypt and get the original link!
  7. // @description:it Bypassa Filecrypt e ottieni il collegamento originale!
  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://buymeacoffee.com/stephenp_greasyfork
  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. if(document.location.href.includes("/Link/")){
  32. getSingleLink();
  33. }
  34. else if(document.location.href.includes("/Container/")){
  35. let art=document.getElementsByClassName("download")[0].parentNode.parentNode.parentNode.parentNode;
  36. let load=document.createElement("DIV");
  37. load.id="dcryptLoadMsg";
  38. load.style.marginBottom="2em";
  39. load.textContent="Loading decrypted links list from dcrypt.it...";
  40. art.parentNode.insertBefore(load,art);
  41. getCNL();
  42. }
  43. })();
  44. function getSingleLink(){
  45. if(document.body.getElementsByTagName("SCRIPT").length==0){
  46. window.stop();
  47. if(body.children.length>0){
  48. const a=document.body.innerHTML.lastIndexOf("http");
  49. top.location.href=document.body.innerHTML.substring(a,document.body.innerHTML.indexOf('id=',a)+43).replace('&amp;', '&');
  50. }
  51. else{
  52. GM.xmlHttpRequest({
  53. method: "GET",
  54. url: document.location.href,
  55. onload: function(response) {
  56. const a=response.responseText.lastIndexOf("http");
  57. top.location.href=response.responseText.substring(a,response.responseText.indexOf('id=',a)+43);
  58. }
  59. });
  60. }
  61. }
  62. }
  63. function getCNL(){
  64. var dlcButton=document.getElementsByClassName("dlcdownload");
  65. if(dlcButton.length>0){
  66. var inputs=document.getElementsByTagName('INPUT');
  67. var dlcId;
  68. /*for(var i=0;i<inputs.length;i++){
  69. if(inputs[i].getAttribute('name')=='hidden_cnl_id'){
  70. dlcId=inputs[i].getAttribute('value');
  71. i=inputs.length;
  72. }
  73. }*/ //left for reference
  74. dlcId=document.getElementsByClassName("dlcdownload")[0].attributes["onclick"].nodeValue.split('\'')[1];
  75. //console.log('dlcId='+dlcId);
  76. GM.xmlHttpRequest({
  77. method: "GET",
  78. url: "https://"+document.location.hostname+"/DLC/"+dlcId+".dlc",
  79. onload: function(response) {
  80. dcrypt(response.responseText);
  81. },
  82. onerror: function(response) {
  83. xhrLinkExtract();
  84. }
  85. });
  86. }
  87. else{
  88. try{
  89. xhrLinkExtract();
  90. }
  91. catch(e){
  92. console.log("Error decrypting the links locally: ");
  93. console.log(e);
  94. 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.";
  95. document.getElementById("dcryptLoadMsg").style.color="red";
  96. }
  97. }
  98. }
  99. function dcrypt(content){
  100. //console.log(content);
  101. GM.xmlHttpRequest({
  102. method: "POST",
  103. url: "http://dcrypt.it/decrypt/paste",
  104. headers: {
  105. "Content-Type": "application/x-www-form-urlencoded"
  106. },
  107. data: "content="+encodeURIComponent(content),
  108. onload: function(response) {
  109. //console.log(response);
  110. var obj=JSON.parse(response.response);
  111. //console.log(obj);
  112. var finalLinksDiv=document.createElement("DIV");
  113. finalLinksDiv.style.backgroundColor=bgColor();
  114. finalLinksDiv.style.borderRadius="10px";
  115. finalLinksDiv.style.padding="1em";
  116. finalLinksDiv.style.marginTop="1em";
  117. finalLinksDiv.style.color=textColor();
  118. finalLinksDiv.style.zIndex="10";
  119. finalLinksDiv.style.position="relative";
  120. finalLinksDiv.style.marginBottom="1em";
  121. let a=document.createElement("SPAN");
  122. a.textContent="Decrypted links:";
  123. finalLinksDiv.appendChild(a);
  124. finalLinksDiv.appendChild(document.createElement("BR"));
  125. finalLinksDiv.appendChild(document.createElement("BR"));
  126. if(obj.success.links.length>0){
  127. try{
  128. for (var link of obj.success.links) {
  129. console.log("Decrypted using dcrypt.it: "+link);
  130. let b=document.createElement("SPAN");
  131. b.textContent=link;
  132. b.addEventListener("click",function(){window.open(link)});
  133. b.addEventListener("contextmenu",copyLink)
  134. b.style.color=textColor();
  135. b.style.cursor="pointer";
  136. finalLinksDiv.appendChild(b);
  137. finalLinksDiv.appendChild(document.createElement("BR"));
  138. }
  139. console.log(finalLinksDiv);
  140. document.getElementById("dcryptLoadMsg").replaceWith(finalLinksDiv);
  141. }
  142. catch(e){
  143. console.log(e);
  144. xhrLinkExtract();
  145. }
  146. /*What was this code doing? I can't remember, but it seems it's not needed anymore
  147. const config = { attributes: true, childList: false, subtree: false };
  148. const callback = function(mutationList, observer) {
  149. for (const mutation of mutationList) {
  150. console.log(mutation);
  151. mutation.target.removeAttribute(mutation.attributeName);
  152.  
  153. }
  154. };
  155. const observer = new MutationObserver(callback);
  156. observer.observe(finalLinksDiv, config);
  157. */
  158. }
  159. else{
  160. xhrLinkExtract();
  161. }
  162. },
  163. onerror: function(response) {
  164. xhrLinkExtract();
  165. }
  166. });
  167. }
  168. function xhrLinkExtract(){
  169. var finalLinksDiv=document.createElement("DIV");
  170. finalLinksDiv.style.backgroundColor=bgColor();
  171. finalLinksDiv.style.borderRadius="10px";
  172. finalLinksDiv.style.padding="1em";
  173. finalLinksDiv.style.marginTop="1em";
  174. finalLinksDiv.style.color=textColor();
  175. finalLinksDiv.style.zIndex="10";
  176. finalLinksDiv.style.position="relative";
  177. finalLinksDiv.style.marginBottom="1em";
  178. let a=document.createElement("SPAN");
  179. a.textContent="Decrypted links:";
  180. finalLinksDiv.appendChild(a);
  181. finalLinksDiv.appendChild(document.createElement("BR"));
  182. finalLinksDiv.appendChild(document.createElement("BR"));
  183. var encLinks=document.querySelectorAll("[onclick^=openLink]");//get all the encrypted links
  184. for(let l of encLinks){
  185. let passA=l.getAttribute("onclick");
  186. let passB=passA.split("'");
  187. let passC=l.getAttribute(passB[1]);
  188. let link="http://"+document.location.hostname+"/Link/"+passC+".html"
  189. GM.xmlHttpRequest({
  190. method: "GET",
  191. url: link,
  192. headers: {
  193. "Content-Type": "application/x-www-form-urlencoded"
  194. },
  195. onload: function(response) {
  196. let scripts=response.responseXML.getElementsByTagName("SCRIPT")
  197. for(let s of scripts){
  198. if(s.innerHTML.includes("top.location.href=")){
  199. getFinalLink(s.innerHTML.split("'")[1],finalLinksDiv);
  200. continue
  201. }
  202. }
  203. }
  204. });
  205. }
  206. document.getElementById("dcryptLoadMsg").replaceWith(finalLinksDiv);
  207. }
  208. function getFinalLink(encLink,finalLinksDiv){
  209. let req=GM.xmlHttpRequest({
  210. method: "OPTIONS",
  211. url: encLink,
  212. headers: {
  213. "Content-Type": "application/x-www-form-urlencoded"
  214. },
  215. onreadystatechange: function(response) {
  216. req.abort();
  217. console.log(response)
  218. console.log("Decrypted locally: "+response.finalUrl);
  219. let b=document.createElement("SPAN");
  220. b.textContent=response.finalUrl;
  221. b.addEventListener("click",function(){window.open(response.finalUrl)});
  222. b.addEventListener("contextmenu",copyLink)
  223. b.style.color=textColor();
  224. b.style.cursor="pointer";
  225. finalLinksDiv.appendChild(b);
  226. finalLinksDiv.appendChild(document.createElement("BR"));
  227. }
  228. });
  229. }
  230. function bgColor(){
  231. var color="white";
  232. const colorTag=document.head.querySelector("meta[name=\"theme-color\"]");
  233. if(colorTag){
  234. color="#0b0d15";
  235. }
  236. return color
  237. }
  238. function textColor(){
  239. var color="black";
  240. const colorTag=document.head.querySelector("meta[name=\"theme-color\"]");
  241. if(colorTag){
  242. color="white";
  243. }
  244. return color
  245. }
  246. function copyLink(e){
  247. e.preventDefault();
  248. e.stopPropagation();
  249. navigator.clipboard.writeText(e.target.innerText);
  250. alert("Link copied: "+e.target.innerText);
  251. }