+ Fixed ChromeCDM request id

+ Added a device ID display to the Widevine Device combobox
This commit is contained in:
BuildTools
2024-10-27 22:12:46 +01:00
parent 1e28a27893
commit c66f29c89d
4 changed files with 11 additions and 9 deletions
-3
View File
@@ -269,9 +269,6 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
break;
case "REMOTE":
await parseLicenseRemote(message.body, sendResponse, tab_url);
// temporary
sendResponse();
break;
}
return;
+9 -4
View File
@@ -1,4 +1,4 @@
const { ClientIdentification } = protobuf.roots.default.license_protocol;
const { ClientIdentification, SignedDrmCertificate, DrmCertificate } = protobuf.roots.default.license_protocol;
export class Crc32 {
constructor() {
@@ -49,16 +49,21 @@ export class WidevineDevice {
const client_info = Object.fromEntries(this.client_id.clientInfo.map(item => [item.name, item.value]))
const type = this.type === 1 ? "CHROME" : `L${this.security_level}`
const root_signed_cert = SignedDrmCertificate.decode(this.client_id.token);
const root_cert = DrmCertificate.decode(root_signed_cert.drmCertificate);
let name = `[${type}]`;
if (client_info["company_name"])
name += ` ${client_info["company_name"]}`;
if (client_info["model_name"])
name += `, ${client_info["model_name"]}`;
name += ` ${client_info["model_name"]}`;
if (client_info["product_name"])
name += `, ${client_info["product_name"]}`;
name += ` ${client_info["product_name"]}`;
if (root_cert.systemId)
name += ` (${root_cert.systemId})`;
const crc32 = new Crc32();
name += `, ${crc32.crc32(this._raw_bytes).toString(16)}`;
name += ` [${crc32.crc32(this._raw_bytes).toString(16)}]`;
return name;
}
+1 -1
View File
@@ -362,7 +362,7 @@ export class Session {
}
_generateGenericIdentifier() {
return forge.random.getBytesSync(16)
return stringToUint8Array(forge.random.getBytesSync(16))
}
static psshDataToPsshBoxB64(pssh_data) {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "WidevineProxy2",
"version": "0.7.2",
"version": "0.7.4",
"permissions": [
"activeTab",
"tabs",