Compare commits
No commits in common. "bafe525510c532962dc3bba8d2f81a384e55b5de" and "094f1edac273780672011c8258641c40160ed0fa" have entirely different histories.
bafe525510
...
094f1edac2
@ -13,9 +13,9 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|||||||
const { type, data } = message;
|
const { type, data } = message;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "DRM_TYPE":
|
case "INTERCEPTED_POST":
|
||||||
console.log("DRM Type:", data);
|
console.log("Storing POST Request", data);
|
||||||
chrome.storage.local.set({ drmType: data });
|
chrome.storage.local.set({ latestLicenseRequest: data });
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "PSSH_DATA":
|
case "PSSH_DATA":
|
||||||
@ -23,14 +23,24 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|||||||
chrome.storage.local.set({ latestPSSH: data });
|
chrome.storage.local.set({ latestPSSH: data });
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "LICENSE_DATA":
|
||||||
|
console.log("Storing License Response:", data);
|
||||||
|
chrome.storage.local.set({ latestLicenseResponse: data });
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "CERTIFICATE_DATA":
|
||||||
|
console.log("Storing Service Certificate:", data);
|
||||||
|
chrome.storage.local.set({ latestServiceCertificate: data });
|
||||||
|
break;
|
||||||
|
|
||||||
case "KEYS_DATA":
|
case "KEYS_DATA":
|
||||||
console.log("Storing Decryption Keys:", data);
|
console.log("Storing Decryption Keys:", data);
|
||||||
chrome.storage.local.set({ latestKeys: data });
|
chrome.storage.local.set({ latestKeys: data });
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "LICENSE_URL":
|
case "DRM_TYPE":
|
||||||
console.log("Storling License URL " + data);
|
console.log("DRM Type:", data);
|
||||||
chrome.storage.local.set({licenseURL: data});
|
chrome.storage.local.set({ drmType: data });
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
23
content.js
23
content.js
@ -1,18 +1,24 @@
|
|||||||
// Inject `inject.js` into the page context
|
// Inject `inject.js` into the page context
|
||||||
(function injectScript() {
|
(function injectScript() {
|
||||||
const script = document.createElement('script');
|
function append() {
|
||||||
script.src = chrome.runtime.getURL('inject.js');
|
const container = document.head || document.documentElement;
|
||||||
script.type = 'text/javascript';
|
if (!container) {
|
||||||
script.onload = () => script.remove(); // Clean up
|
return requestAnimationFrame(append); // Wait for DOM to exist
|
||||||
// Inject directly into <html> or <head>
|
}
|
||||||
(document.documentElement || document.head || document.body).appendChild(script);
|
const script = document.createElement('script');
|
||||||
|
script.src = chrome.runtime.getURL('inject.js');
|
||||||
|
script.type = 'text/javascript';
|
||||||
|
script.onload = () => script.remove(); // Clean up after injecting
|
||||||
|
container.appendChild(script);
|
||||||
|
}
|
||||||
|
append();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Listen for messages from the injected script
|
// Listen for messages from the injected script
|
||||||
window.addEventListener("message", function(event) {
|
window.addEventListener("message", function(event) {
|
||||||
if (event.source !== window) return;
|
if (event.source !== window) return;
|
||||||
|
|
||||||
if (["__DRM_TYPE__", "__PSSH_DATA__", "__KEYS_DATA__", "__LICENSE_URL__"].includes(event.data?.type)) {
|
if (["__INTERCEPTED_POST__", "__PSSH_DATA__", "__LICENSE_DATA__", "__CERTIFICATE_DATA__", "__KEYS_DATA__", "__DRM_TYPE__"].includes(event.data?.type)) {
|
||||||
chrome.runtime.sendMessage({
|
chrome.runtime.sendMessage({
|
||||||
type: event.data.type.replace("__", "").replace("__", ""),
|
type: event.data.type.replace("__", "").replace("__", ""),
|
||||||
data: event.data.data
|
data: event.data.data
|
||||||
@ -20,6 +26,7 @@ window.addEventListener("message", function(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event.data.type === "__GET_CDM_DEVICES__") {
|
if (event.data.type === "__GET_CDM_DEVICES__") {
|
||||||
|
console.log("Received request for CDM devices");
|
||||||
|
|
||||||
chrome.storage.local.get(["widevine_device", "playready_device"], (result) => {
|
chrome.storage.local.get(["widevine_device", "playready_device"], (result) => {
|
||||||
const widevine_device = result.widevine_device || null;
|
const widevine_device = result.widevine_device || null;
|
||||||
@ -37,6 +44,7 @@ window.addEventListener("message", function(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event.data.type === "__GET_INJECTION_TYPE__") {
|
if (event.data.type === "__GET_INJECTION_TYPE__") {
|
||||||
|
console.log("Received request for injection type");
|
||||||
|
|
||||||
chrome.storage.local.get("injection_type", (result) => {
|
chrome.storage.local.get("injection_type", (result) => {
|
||||||
const injectionType = result.injection_type || "LICENSE";
|
const injectionType = result.injection_type || "LICENSE";
|
||||||
@ -51,6 +59,7 @@ window.addEventListener("message", function(event) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (event.data.type === "__GET_DRM_OVERRIDE__") {
|
if (event.data.type === "__GET_DRM_OVERRIDE__") {
|
||||||
|
console.log("Received request for DRM override");
|
||||||
|
|
||||||
chrome.storage.local.get("drm_override", (result) => {
|
chrome.storage.local.get("drm_override", (result) => {
|
||||||
const drmOverride = result.drm_override || "DISABLED";
|
const drmOverride = result.drm_override || "DISABLED";
|
||||||
|
52
frontend/dist/assets/index-BFZJq4X0.js
vendored
Normal file
52
frontend/dist/assets/index-BFZJq4X0.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24
frontend/dist/index.html
vendored
24
frontend/dist/index.html
vendored
@ -1,13 +1,13 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>CDRM Decryption Extension</title>
|
<title>CDRM Decryption Extension</title>
|
||||||
<script type="module" crossorigin src="./assets/index-ydPQKJSy.js"></script>
|
<script type="module" crossorigin src="./assets/index-CN3ssfBX.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-UaipKa9p.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-UaipKa9p.css">
|
||||||
</head>
|
</head>
|
||||||
<body class="min-w-full min-h-full w-full h-full">
|
<body class="min-w-full min-h-full w-full h-full">
|
||||||
<div class="min-w-full min-h-full w-full h-full" id="root"></div>
|
<div class="min-w-full min-h-full w-full h-full" id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -4,21 +4,16 @@ function Results() {
|
|||||||
const [drmType, setDrmType] = useState("");
|
const [drmType, setDrmType] = useState("");
|
||||||
const [pssh, setPssh] = useState("");
|
const [pssh, setPssh] = useState("");
|
||||||
const [licenseUrl, setLicenseUrl] = useState("");
|
const [licenseUrl, setLicenseUrl] = useState("");
|
||||||
const [keys, setKeys] = useState([]);
|
const [keys, setKeys] = useState("");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
chrome.storage.local.get(
|
chrome.storage.local.get(
|
||||||
[
|
["drmType", "latestPSSH", "latestLicenseRequest", "latestKeys"],
|
||||||
"drmType",
|
|
||||||
"latestPSSH",
|
|
||||||
"latestLicenseRequest",
|
|
||||||
"latestKeys",
|
|
||||||
"licenseURL",
|
|
||||||
],
|
|
||||||
(result) => {
|
(result) => {
|
||||||
if (result.drmType) setDrmType(result.drmType);
|
if (result.drmType) setDrmType(result.drmType);
|
||||||
if (result.latestPSSH) setPssh(result.latestPSSH);
|
if (result.latestPSSH) setPssh(result.latestPSSH);
|
||||||
if (result.licenseURL) setLicenseUrl(result.licenseURL);
|
if (result.latestLicenseRequest?.url)
|
||||||
|
setLicenseUrl(result.latestLicenseRequest.url);
|
||||||
if (result.latestKeys) {
|
if (result.latestKeys) {
|
||||||
try {
|
try {
|
||||||
const parsed = Array.isArray(result.latestKeys)
|
const parsed = Array.isArray(result.latestKeys)
|
||||||
@ -41,8 +36,8 @@ function Results() {
|
|||||||
if (changes.latestPSSH) {
|
if (changes.latestPSSH) {
|
||||||
setPssh(changes.latestPSSH.newValue);
|
setPssh(changes.latestPSSH.newValue);
|
||||||
}
|
}
|
||||||
if (changes.licenseURL) {
|
if (changes.latestLicenseRequest) {
|
||||||
setLicenseUrl(changes.licenseURL.newValue);
|
setLicenseUrl(changes.latestLicenseRequest.newValue.url);
|
||||||
}
|
}
|
||||||
if (changes.latestKeys) {
|
if (changes.latestKeys) {
|
||||||
setKeys(changes.latestKeys.newValue);
|
setKeys(changes.latestKeys.newValue);
|
||||||
@ -59,7 +54,7 @@ function Results() {
|
|||||||
chrome.storage.local.set({
|
chrome.storage.local.set({
|
||||||
drmType: "None",
|
drmType: "None",
|
||||||
latestPSSH: "None",
|
latestPSSH: "None",
|
||||||
licenseURL: "None",
|
latestLicenseRequest: { url: "None" },
|
||||||
latestKeys: [],
|
latestKeys: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -49,6 +49,35 @@ function TopNav({ onMenuClick }) {
|
|||||||
className="h-full w-16 p-2 flex items-center cursor-pointer"
|
className="h-full w-16 p-2 flex items-center cursor-pointer"
|
||||||
onClick={onMenuClick}
|
onClick={onMenuClick}
|
||||||
/>
|
/>
|
||||||
|
<div className="flex flex-row h-full justify-center items-center ml-auto mr-2">
|
||||||
|
<p className="text-white text-lg p-2 mr-2 border-r-2 border-r-white text-nowrap">
|
||||||
|
DRM Override:
|
||||||
|
</p>
|
||||||
|
<button
|
||||||
|
onClick={() => handleDrmOverrideChange("WIDEVINE")}
|
||||||
|
className={`text-white text-lg p-2 rounded-md m-1 cursor-pointer ${
|
||||||
|
drmOverride === "WIDEVINE" ? "bg-green-500/70" : "bg-black"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
Widevine
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => handleDrmOverrideChange("PLAYREADY")}
|
||||||
|
className={`text-white text-lg p-2 rounded-md m-1 cursor-pointer ${
|
||||||
|
drmOverride === "PLAYREADY" ? "bg-sky-500/70" : "bg-black"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
PlayReady
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => handleDrmOverrideChange("DISABLED")}
|
||||||
|
className={`text-white text-lg p-2 rounded-md m-1 cursor-pointer ${
|
||||||
|
drmOverride === "DISABLED" ? "bg-red-500/70" : "bg-black"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
Disabled
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div className="flex flex-row h-full justify-center items-center ml-auto mr-2">
|
<div className="flex flex-row h-full justify-center items-center ml-auto mr-2">
|
||||||
<p className="text-white text-lg p-2 mr-2 border-r-2 border-r-white text-nowrap">
|
<p className="text-white text-lg p-2 mr-2 border-r-2 border-r-white text-nowrap">
|
||||||
Injection Type:
|
Injection Type:
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,13 +1,13 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>CDRM Decryption Extension</title>
|
<title>CDRM Decryption Extension</title>
|
||||||
<script type="module" crossorigin src="./assets/index-ydPQKJSy.js"></script>
|
<script type="module" crossorigin src="./assets/index-CN3ssfBX.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-UaipKa9p.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-UaipKa9p.css">
|
||||||
</head>
|
</head>
|
||||||
<body class="min-w-full min-h-full w-full h-full">
|
<body class="min-w-full min-h-full w-full h-full">
|
||||||
<div class="min-w-full min-h-full w-full h-full" id="root"></div>
|
<div class="min-w-full min-h-full w-full h-full" id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user