Last active
August 20, 2024 23:21
-
-
Save bipinkrish/68e6d36a5fd9a8f3d696fdb6e7b5b897 to your computer and use it in GitHub Desktop.
Filecrypt Bypass - get direct links of filecrypt links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import cloudscraper | |
import requests | |
import json | |
url = input("enter filecrypt link like https://filecrypt.co/Container/73F6D9D43B.html or html filepath like 75C3806BBE.html: ") | |
def getlinks(dlc): | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0', | |
'Accept': 'application/json, text/javascript, */*', | |
'Accept-Language': 'en-US,en;q=0.5', | |
'X-Requested-With': 'XMLHttpRequest', | |
'Origin': 'http://dcrypt.it', | |
'Connection': 'keep-alive', | |
'Referer': 'http://dcrypt.it/', | |
} | |
data = { | |
'content': dlc, | |
} | |
response = requests.post('http://dcrypt.it/decrypt/paste', headers=headers, data=data).json()["success"]["links"] | |
links = "" | |
for link in response: | |
links = links + link + "\n\n" | |
print(links) | |
return links | |
def filecrypt(url): | |
client = cloudscraper.create_scraper(allow_brotli=False) | |
headers = { | |
"authority": "filecrypt.co", | |
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", | |
"accept-language": "en-US,en;q=0.9", | |
"cache-control": "max-age=0", | |
"content-type": "application/x-www-form-urlencoded", | |
"origin": "https://filecrypt.co", | |
"referer": url, | |
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" | |
} | |
resp = client.get(url, headers=headers) | |
soup = BeautifulSoup(resp.content, "html.parser") | |
buttons = soup.find_all("button") | |
for ele in buttons: | |
line = ele.get("onclick") | |
if line !=None and "DownloadDLC" in line: | |
dlclink = "https://filecrypt.co/DLC/" + line.split("DownloadDLC('")[1].split("'")[0] + ".html" | |
break | |
resp = client.get(dlclink,headers=headers) | |
if resp.text == "": | |
print("Falied, if this is a link then try downloading html file of that link and pass the filepath, if it is a filepath then redownload html file and retry") | |
else: | |
getlinks(resp.text) | |
filecrypt(url) |
cookies expire, we cant hardcode it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jeovaemanuel it's need cookies at header, you can add cookie value on filecrypt(url) def.
e.g :
"cookie": "PHPSESSID=dgad97gqjjpgiae83qjdddv3a2; lang=en; ab=1696546708; ha=1; %3A_$Yo0FsXyVd1CoS01LMTUFWfviO5ANC18Z.c=8; haad=1; haac=1; ac=22; acn=22",