mirror of
https://cdm-project.com/Decryption-Tools/TPD-Keys.git
synced 2025-04-30 00:34:24 +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 dependencies
|
||||||
import os
|
import os
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Define api key check
|
# Define api key check
|
||||||
|
@ -7,6 +7,7 @@ import tarfile
|
|||||||
import stat
|
import stat
|
||||||
from Helpers import os_check
|
from Helpers import os_check
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Create / Check folders function
|
# Create / Check folders function
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import os
|
import os
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Define cache function
|
# Define cache function
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# Import dependencies
|
# Import dependencies
|
||||||
import Helpers
|
import Helpers
|
||||||
import os
|
import os
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
def capability_check():
|
def capability_check():
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Check to see if the database already exists, if not create a keys folder, and create the database.
|
# 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 Sites.Generic
|
||||||
import license_curl
|
import license_curl
|
||||||
import Helpers.os_check
|
import Helpers.os_check
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Web Download function generic
|
# Web Download function generic
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import PySimpleGUI as sg
|
import PySimpleGUI as sg
|
||||||
import Sites
|
import Sites
|
||||||
import ast
|
import ast
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
def clean_dict(dict: str = None):
|
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([
|
left_frame_normal = sg.Col([
|
||||||
[sg.Text('PSSH:'), sg.Text(size=(15, 1), key='-PSSH_TEXT-', expand_x=True, expand_y=True)],
|
[sg.Text('PSSH:'), sg.Text(size=(15, 1), key='-PSSH_TEXT-', expand_x=True, expand_y=True)],
|
||||||
[sg.Input(key="-PSSH-")],
|
[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.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.Input(key='-LIC_URL-')],
|
||||||
|
[sg.VPush()],
|
||||||
[sg.Text('Keys:')],
|
[sg.Text('Keys:')],
|
||||||
[sg.Output(size=(45, 6), key='-OUTPUT-', expand_y=True, expand_x=True)],
|
[sg.Output(size=(45, 6), key='-OUTPUT-', expand_y=True, expand_x=True)],
|
||||||
[sg.Button('Decrypt'), sg.Button('Reset')]
|
[sg.Button('Decrypt'), sg.Button('Reset')]
|
||||||
@ -42,7 +45,7 @@ def start_gui(wvd: str = None, api_key: str = None):
|
|||||||
]
|
]
|
||||||
|
|
||||||
# the window
|
# 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
|
# the event loop
|
||||||
while True:
|
while True:
|
||||||
@ -66,12 +69,15 @@ def start_gui(wvd: str = None, api_key: str = None):
|
|||||||
except Exception as error:
|
except Exception as error:
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
window['-OUTPUT-'].update(f"{error}")
|
||||||
if values['-USE_API-']:
|
if values['-USE_API-']:
|
||||||
try:
|
if api_key is None:
|
||||||
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key, in_pssh=values['-PSSH-'],
|
window['-OUTPUT-'].update(f"No API key")
|
||||||
in_license_url=values['-LIC_URL-'])
|
if api_key is not None:
|
||||||
window['-OUTPUT-'].update(f"{key_out}")
|
try:
|
||||||
except Exception as error:
|
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key, in_pssh=values['-PSSH-'],
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
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 values['-HEADERS-'] != '':
|
||||||
if not values['-USE_API-']:
|
if not values['-USE_API-']:
|
||||||
@ -83,14 +89,17 @@ def start_gui(wvd: str = None, api_key: str = None):
|
|||||||
except Exception as error:
|
except Exception as error:
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
window['-OUTPUT-'].update(f"{error}")
|
||||||
if values['-USE_API-']:
|
if values['-USE_API-']:
|
||||||
try:
|
if api_key is None:
|
||||||
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key,
|
window['-OUTPUT-'].update(f"No API key")
|
||||||
in_pssh=values['-PSSH-'],
|
if api_key is not None:
|
||||||
in_license_url=values['-LIC_URL-'],
|
try:
|
||||||
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])))
|
_, key_out = Sites.Generic.decrypt_generic_remotely(api_key=api_key,
|
||||||
window['-OUTPUT-'].update(f"{key_out}")
|
in_pssh=values['-PSSH-'],
|
||||||
except Exception as error:
|
in_license_url=values['-LIC_URL-'],
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
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
|
# Error for no license URL - Generic
|
||||||
if values['-PSSH-'] != '' and values['-LIC_URL-'] == '' and values['-OPTIONS-'] == '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:
|
except Exception as error:
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
window['-OUTPUT-'].update(f"{error}")
|
||||||
if values['-USE_API-']:
|
if values['-USE_API-']:
|
||||||
try:
|
if api_key is None:
|
||||||
_, key_out = Sites.Crunchyroll.decrypt_crunchyroll_remotely(api_key=api_key, in_pssh=values['-PSSH-'],
|
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-'])))
|
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])))
|
||||||
window['-OUTPUT-'].update(f"{key_out}")
|
window['-OUTPUT-'].update(f"{key_out}")
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
window['-OUTPUT-'].update(f"{error}")
|
||||||
|
|
||||||
# Error for no Headers - Generic
|
# Error for no Headers - Generic
|
||||||
if values['-PSSH-'] != '' and values['-OPTIONS-'] == 'Crunchyroll' and values['-HEADERS-'] == '':
|
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:
|
except Exception as error:
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
window['-OUTPUT-'].update(f"{error}")
|
||||||
if values['-USE_API-']:
|
if values['-USE_API-']:
|
||||||
try:
|
if api_key is None:
|
||||||
_, key_out = Sites.YouTube.decrypt_youtube_remotely(api_key=api_key, in_license_url=values['-LIC_URL-'],
|
window['-OUTPUT-'].update(f"No API key")
|
||||||
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])),
|
if api_key is not None:
|
||||||
license_curl_json=ast.literal_eval(clean_dict(dict=values['-JSON-'])),
|
try:
|
||||||
license_curl_cookies=ast.literal_eval(clean_dict(dict=values['-COOKIES-'])))
|
_, key_out = Sites.YouTube.decrypt_youtube_remotely(api_key=api_key, in_license_url=values['-LIC_URL-'],
|
||||||
window['-OUTPUT-'].update(f"{key_out}")
|
license_curl_headers=ast.literal_eval(clean_dict(dict=values['-HEADERS-'])),
|
||||||
except Exception as error:
|
license_curl_json=ast.literal_eval(clean_dict(dict=values['-JSON-'])),
|
||||||
window['-OUTPUT-'].update(f"{error}")
|
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
|
# Error for no Headers - Crunchyroll
|
||||||
if values['-LIC_URL-'] != '' and values['-OPTIONS-'] == 'YouTube' and values['-HEADERS-'] == '' and values['-JSON-'] != '' and values['-COOKIES-'] != '':
|
if values['-LIC_URL-'] != '' and values['-OPTIONS-'] == 'YouTube' and values['-HEADERS-'] == '' and values['-JSON-'] != '' and values['-COOKIES-'] != '':
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import requests
|
import requests
|
||||||
import re
|
import re
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Define MPD / m3u8 PSSH parser
|
# Define MPD / m3u8 PSSH parser
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
def get_os_specific():
|
def get_os_specific():
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# Import dependencies
|
# Import dependencies
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Define WVD device check
|
# Define WVD device check
|
||||||
|
@ -7,6 +7,7 @@ import requests
|
|||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import Helpers
|
import Helpers
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Defining decrypt function for canal plus
|
# Defining decrypt function for canal plus
|
||||||
|
@ -7,7 +7,7 @@ import requests
|
|||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import Helpers
|
import Helpers
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
# Defining decrypt function for Crunchyroll
|
# Defining decrypt function for Crunchyroll
|
||||||
def decrypt_crunchyroll(wvd: str = None, license_curl_headers: dict = None, mpd_url: str = None,
|
def decrypt_crunchyroll(wvd: str = None, license_curl_headers: dict = None, mpd_url: str = None,
|
||||||
|
@ -7,6 +7,7 @@ import requests
|
|||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import Helpers
|
import Helpers
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Defining decrypt function for generic services
|
# Defining decrypt function for generic services
|
||||||
|
@ -9,6 +9,7 @@ import base64
|
|||||||
import os
|
import os
|
||||||
import Helpers
|
import Helpers
|
||||||
import re
|
import re
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Defining decrypt function for generic services
|
# Defining decrypt function for generic services
|
||||||
|
@ -7,6 +7,7 @@ import requests
|
|||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import Helpers
|
import Helpers
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
|
|
||||||
# Defining decrypt function for YouTube
|
# 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 Sites
|
||||||
import license_curl
|
import license_curl
|
||||||
import argparse
|
import argparse
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
# Get device and api key
|
# Get device and api key
|
||||||
device, api_key = Helpers.capability_check.capability_check()
|
device, api_key = Helpers.capability_check.capability_check()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user