mirror of
https://cdm-project.com/Decryption-Tools/TPD-Keys.git
synced 2025-04-30 00:44:25 +02:00
v1.21
Added code to allow exe build. Minor GUI changes
This commit is contained in:
parent
f99f4be1ef
commit
577d36920a
@ -1,5 +1,6 @@
|
||||
# Import dependencies
|
||||
import os
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Define api key check
|
||||
|
@ -7,6 +7,7 @@ import tarfile
|
||||
import stat
|
||||
from Helpers import os_check
|
||||
from tqdm import tqdm
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Create / Check folders function
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
import sqlite3
|
||||
import os
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Define cache function
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Import dependencies
|
||||
import Helpers
|
||||
import os
|
||||
from sys import exit
|
||||
|
||||
|
||||
def capability_check():
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
import os
|
||||
import sqlite3
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Check to see if the database already exists, if not create a keys folder, and create the database.
|
||||
|
@ -6,6 +6,7 @@ import Helpers.binary_check
|
||||
import Sites.Generic
|
||||
import license_curl
|
||||
import Helpers.os_check
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Web Download function generic
|
||||
|
@ -1,6 +1,7 @@
|
||||
import PySimpleGUI as sg
|
||||
import Sites
|
||||
import ast
|
||||
from sys import exit
|
||||
|
||||
|
||||
def clean_dict(dict: str = None):
|
||||
@ -20,8 +21,10 @@ def start_gui(wvd: str = None, api_key: str = None):
|
||||
left_frame_normal = sg.Col([
|
||||
[sg.Text('PSSH:'), sg.Text(size=(15, 1), key='-PSSH_TEXT-', expand_x=True, expand_y=True)],
|
||||
[sg.Input(key="-PSSH-")],
|
||||
[sg.VPush()],
|
||||
[sg.Text(text='License URL:'), sg.Text(size=(15, 1), key='-LIC_URL_TEXT-', expand_x=True, expand_y=True)],
|
||||
[sg.Input(key='-LIC_URL-')],
|
||||
[sg.VPush()],
|
||||
[sg.Text('Keys:')],
|
||||
[sg.Output(size=(45, 6), key='-OUTPUT-', expand_y=True, expand_x=True)],
|
||||
[sg.Button('Decrypt'), sg.Button('Reset')]
|
||||
@ -42,7 +45,7 @@ def start_gui(wvd: str = None, api_key: str = None):
|
||||
]
|
||||
|
||||
# the window
|
||||
window = sg.Window('TPD-Keys', layout=window_layout, resizable=True)
|
||||
window = sg.Window('TPD-Keys', layout=window_layout, resizable=True, size=(800, 800))
|
||||
|
||||
# the event loop
|
||||
while True:
|
||||
@ -66,12 +69,15 @@ def start_gui(wvd: str = None, api_key: str = None):
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
if values['-USE_API-']:
|
||||
try:
|
||||
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key, in_pssh=values['-PSSH-'],
|
||||
in_license_url=values['-LIC_URL-'])
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
if api_key is None:
|
||||
window['-OUTPUT-'].update(f"No API key")
|
||||
if api_key is not None:
|
||||
try:
|
||||
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key, in_pssh=values['-PSSH-'],
|
||||
in_license_url=values['-LIC_URL-'])
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
|
||||
if values['-HEADERS-'] != '':
|
||||
if not values['-USE_API-']:
|
||||
@ -83,14 +89,17 @@ def start_gui(wvd: str = None, api_key: str = None):
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
if values['-USE_API-']:
|
||||
try:
|
||||
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key,
|
||||
in_pssh=values['-PSSH-'],
|
||||
in_license_url=values['-LIC_URL-'],
|
||||
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])))
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
if api_key is None:
|
||||
window['-OUTPUT-'].update(f"No API key")
|
||||
if api_key is not None:
|
||||
try:
|
||||
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key,
|
||||
in_pssh=values['-PSSH-'],
|
||||
in_license_url=values['-LIC_URL-'],
|
||||
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])))
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
|
||||
# Error for no license URL - Generic
|
||||
if values['-PSSH-'] != '' and values['-LIC_URL-'] == '' and values['-OPTIONS-'] == 'Generic':
|
||||
@ -114,12 +123,15 @@ def start_gui(wvd: str = None, api_key: str = None):
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
if values['-USE_API-']:
|
||||
try:
|
||||
_, key_out = Sites.Crunchyroll.decrypt_crunchyroll_remotely(api_key=api_key, in_pssh=values['-PSSH-'],
|
||||
if api_key is None:
|
||||
window['-OUTPUT-'].update(f"No API key")
|
||||
if api_key is not None:
|
||||
try:
|
||||
_, key_out = Sites.Crunchyroll.decrypt_crunchyroll_remotely(api_key=api_key, in_pssh=values['-PSSH-'],
|
||||
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])))
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
|
||||
# Error for no Headers - Generic
|
||||
if values['-PSSH-'] != '' and values['-OPTIONS-'] == 'Crunchyroll' and values['-HEADERS-'] == '':
|
||||
@ -141,14 +153,17 @@ def start_gui(wvd: str = None, api_key: str = None):
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
if values['-USE_API-']:
|
||||
try:
|
||||
_, key_out = Sites.YouTube.decrypt_youtube_remotely(api_key=api_key, in_license_url=values['-LIC_URL-'],
|
||||
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])),
|
||||
license_curl_json=ast.literal_eval(clean_dict(dict=values['-JSON-'])),
|
||||
license_curl_cookies=ast.literal_eval(clean_dict(dict=values['-COOKIES-'])))
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
if api_key is None:
|
||||
window['-OUTPUT-'].update(f"No API key")
|
||||
if api_key is not None:
|
||||
try:
|
||||
_, key_out = Sites.YouTube.decrypt_youtube_remotely(api_key=api_key, in_license_url=values['-LIC_URL-'],
|
||||
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])),
|
||||
license_curl_json=ast.literal_eval(clean_dict(dict=values['-JSON-'])),
|
||||
license_curl_cookies=ast.literal_eval(clean_dict(dict=values['-COOKIES-'])))
|
||||
window['-OUTPUT-'].update(f"{key_out}")
|
||||
except Exception as error:
|
||||
window['-OUTPUT-'].update(f"{error}")
|
||||
|
||||
# Error for no Headers - Crunchyroll
|
||||
if values['-LIC_URL-'] != '' and values['-OPTIONS-'] == 'YouTube' and values['-HEADERS-'] == '' and values['-JSON-'] != '' and values['-COOKIES-'] != '':
|
||||
|
@ -1,5 +1,6 @@
|
||||
import requests
|
||||
import re
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Define MPD / m3u8 PSSH parser
|
||||
|
@ -1,4 +1,5 @@
|
||||
import os
|
||||
from sys import exit
|
||||
|
||||
|
||||
def get_os_specific():
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Import dependencies
|
||||
import os
|
||||
import glob
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Define WVD device check
|
||||
|
@ -7,6 +7,7 @@ import requests
|
||||
import base64
|
||||
import os
|
||||
import Helpers
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Defining decrypt function for canal plus
|
||||
|
@ -7,7 +7,7 @@ import requests
|
||||
import base64
|
||||
import os
|
||||
import Helpers
|
||||
|
||||
from sys import exit
|
||||
|
||||
# Defining decrypt function for Crunchyroll
|
||||
def decrypt_crunchyroll(wvd: str = None, license_curl_headers: dict = None, mpd_url: str = None,
|
||||
|
@ -7,6 +7,7 @@ import requests
|
||||
import base64
|
||||
import os
|
||||
import Helpers
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Defining decrypt function for generic services
|
||||
|
@ -9,6 +9,7 @@ import base64
|
||||
import os
|
||||
import Helpers
|
||||
import re
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Defining decrypt function for generic services
|
||||
|
@ -7,6 +7,7 @@ import requests
|
||||
import base64
|
||||
import os
|
||||
import Helpers
|
||||
from sys import exit
|
||||
|
||||
|
||||
# Defining decrypt function for YouTube
|
||||
|
@ -1,15 +0,0 @@
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0',
|
||||
'Accept': '*/*',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
# 'Accept-Encoding': 'gzip, deflate, br',
|
||||
'DNT': '1',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'cross-site',
|
||||
'Sec-GPC': '1',
|
||||
'Connection': 'keep-alive',
|
||||
# Requests doesn't support trailers
|
||||
# 'TE': 'trailers',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
}
|
@ -3,6 +3,7 @@ import Helpers
|
||||
import Sites
|
||||
import license_curl
|
||||
import argparse
|
||||
from sys import exit
|
||||
|
||||
# Get device and api key
|
||||
device, api_key = Helpers.capability_check.capability_check()
|
||||
|
Loading…
x
Reference in New Issue
Block a user