+
+ 🔙 Back
+ 💾 Save History
+ ❌ Clear History
+
+
+
+
+
+
+
diff --git a/popup.js b/popup.js
index 079d1ea..bfe6341 100644
--- a/popup.js
+++ b/popup.js
@@ -74,16 +74,30 @@ async function autoSelect(){
if (clearkey) {
document.getElementById('noEME').style.display = 'none';
- document.getElementById('ckHome').style.display = 'grid';
+ document.getElementById('wvHome').style.display = 'none';
+ document.getElementById('ckHome').style.display = 'flex';
+ document.getElementById('history').style.display = 'none'
+ document.getElementById('selectPssh').style.display = 'none';
+ document.getElementById('selectRequest').style.display = 'none';
document.getElementById('ckResult').value = clearkey;
document.getElementById('ckResult').addEventListener("click", copyResult);
document.getElementById('toggleHistory').style.display = 'none'
} else if (psshs.length) {
+ document.getElementById('wvHome').style.display = 'flex';
document.getElementById('noEME').style.display = 'none';
- document.getElementById('home').style.display = 'grid';
+ document.getElementById('ckHome').style.display = 'none';
+ document.getElementById('history').style.display = 'none';
document.getElementById('guess').addEventListener("click", guess);
document.getElementById('result').addEventListener("click", copyResult);
drawList(psshs, 'psshSearch', 'psshList', 'pssh');
drawList(requests.map(r => r['url']), 'requestSearch', 'requestList', 'license');
autoSelect();
}
+else {
+ document.getElementById('noEME').style.display = 'flex';
+ document.getElementById('wvHome').style.display = 'none';
+ document.getElementById('ckHome').style.display = 'none';
+ document.getElementById('selectPssh').style.display = 'none';
+ document.getElementById('selectRequest').style.display = 'none';
+ document.getElementById('history').style.display = 'none';
+}
diff --git a/popup_drawList.js b/popup_drawList.js
index fb10b38..328191b 100644
--- a/popup_drawList.js
+++ b/popup_drawList.js
@@ -1,15 +1,11 @@
function selectPssh(){
- document.getElementById('home').style.display='none';
- document.getElementById('selectPssh').style.display='grid';
- document.getElementById('psshList').style.display='grid';
- document.getElementById('toggleHistory').style.display='none';
+ document.getElementById('wvHome').style.display='none';
+ document.getElementById('selectPssh').style.display='flex';
}
function selectRequest(){
- document.getElementById('home').style.display='none';
- document.getElementById('selectRequest').style.display='grid';
- document.getElementById('requestList').style.display='grid';
- document.getElementById('toggleHistory').style.display='none';
+ document.getElementById('wvHome').style.display='none';
+ document.getElementById('selectRequest').style.display='flex';
}
document.getElementById('psshButton').addEventListener("click", selectPssh);
@@ -18,17 +14,17 @@ document.getElementById('licenseButton').addEventListener("click", selectRequest
function writeListElement(arrElements, list, outputVar, search) {
list.innerHTML = '';
arrElements.forEach((element, index) => {
- if (!search || element.includes(searchValue)) {
+ // Check if search is defined and if the element includes the search value
+ if (!search || element.toLowerCase().includes(search)) {
const li = document.createElement('li');
li.textContent = element;
li.addEventListener('click', () => {
- userInputs[outputVar]=index;
- document.getElementById(outputVar).value=element;
- document.getElementById(outputVar+'Index').value=index;
- document.getElementById('selectPssh').style.display='none';
- document.getElementById('selectRequest').style.display='none';
- document.getElementById('home').style.display='grid';
- document.getElementById('toggleHistory').style.display='grid';
+ userInputs[outputVar] = index;
+ document.getElementById(outputVar).value = element;
+ document.getElementById(outputVar + 'Index').value = index;
+ document.getElementById('selectPssh').style.display = 'none';
+ document.getElementById('selectRequest').style.display = 'none';
+ document.getElementById('wvHome').style.display = 'flex';
});
list.appendChild(li);
}
diff --git a/popup_showHistory.js b/popup_showHistory.js
index 0a9c5e6..ea072a5 100644
--- a/popup_showHistory.js
+++ b/popup_showHistory.js
@@ -4,20 +4,18 @@ function showHistory(){
let tree=jsonview.renderJSON(JSON.stringify(data), document.getElementById('histDisp'));
jsonview.toggleNode(tree);
}));
- document.getElementById('home').style.display='none';
+ document.getElementById('wvHome').style.display='none';
document.getElementById('noEME').style.display='none';
- document.getElementById('history').style.display='grid';
- document.getElementById('toggleHistory').style.display='none';
+ document.getElementById('history').style.display='flex';
}
function backHistory(){
document.getElementById('histDisp').innerHTML="";
document.getElementById('history').style.display='none';
- document.getElementById('toggleHistory').style.display='grid';
if(psshs.length){
- document.getElementById('home').style.display='grid';
+ document.getElementById('wvHome').style.display='flex';
} else {
- document.getElementById('noEME').style.display='grid';
+ document.getElementById('noEME').style.display='none';
}
}
diff --git a/popup_updateNotice.js b/popup_updateNotice.js
index 68df4f8..1672ac1 100644
--- a/popup_updateNotice.js
+++ b/popup_updateNotice.js
@@ -2,8 +2,8 @@ document.addEventListener('DOMContentLoaded', async function() {
cManifest=await fetch("manifest.json").then(r=>r.json());
rManifest=await fetch("https://raw.githubusercontent.com/FoxRefire/wvg/next/manifest.json").then(r=>r.json());
if(cManifest.version < rManifest.version){
- let notice = document.getElementById("updateNotice");
- notice.style.display='block';
+ let notice = document.getElementById("updateNoticeExtension");
+ notice.style.display='flex';
notice.innerHTML = notice.innerHTML.replace("=VER=", rManifest.version);
notice.innerHTML = notice.innerHTML.replace("=HASH=", rManifest.version_name);
}
diff --git a/python/pre.py b/python/pre.py
index 7e418c4..d4da961 100644
--- a/python/pre.py
+++ b/python/pre.py
@@ -75,6 +75,22 @@ def loadBody(loadAs: str):
return licBody
+# Define a function to get challenge if needed to set a service cert
+def getChallenge(getAs, *cert):
+ global session_id
+ global pssh
+
+ if bool(cert):
+ cdm.set_service_certificate(session_id, cert[0])
+
+ challenge = cdm.get_license_challenge(session_id, pssh)
+
+ match getAs:
+ case "blob": pass
+ case "b64": challenge = base64.b64encode(challenge).decode()
+ case "list": challenge = list(challenge)
+ return challenge
+
# prepare pssh
pssh = PSSH(pssh)
diff --git a/python/schemes/Amazon.py b/python/schemes/Amazon.py
index 527934f..cda7794 100644
--- a/python/schemes/Amazon.py
+++ b/python/schemes/Amazon.py
@@ -1,8 +1,8 @@
import urllib.parse
-payload = f"widevine2Challenge={urllib.parse.quote(base64.b64encode(challenge).decode())}&includeHdcpTestKeyInLicense=true"
-
-licHeaders['User-Agent'] = "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0"
-
-res = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
-licence = res['widevine2License']['license']
-
+payload = f'widevine2Challenge={urllib.parse.quote(base64.b64encode(cdm.service_certificate_challenge).decode())}&includeHdcpTestKeyInLicense=true'
+service_cert = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
+service_cert = service_cert['widevine2License']['license']
+getChallenge('b64', service_cert)
+payload = f'widevine2Challenge={urllib.parse.quote(getChallenge("b64", service_cert))}&includeHdcpTestKeyInLicense=true'
+licence = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
+licence = licence['widevine2License']['license']
\ No newline at end of file
diff --git a/python/schemes/CanalPlus.py b/python/schemes/CanalPlus.py
deleted file mode 100644
index 9def013..0000000
--- a/python/schemes/CanalPlus.py
+++ /dev/null
@@ -1,7 +0,0 @@
-payload = loadBody("json")
-
-b64challenge = base64.b64encode(challenge).decode()
-payload['ServiceRequest']['InData']['ChallengeInfo'] = b64challenge
-
-res = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
-licence = res['ServiceResponse']['OutData']['LicenseInfo']
diff --git a/python/schemes/CanalPlus2.py b/python/schemes/CanalPlus2.py
deleted file mode 100644
index d8e4322..0000000
--- a/python/schemes/CanalPlus2.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import xml.etree.ElementTree as ET
-b64challenge = base64.b64encode(challenge).decode()
-res = await corsFetch(licUrl, "POST", licHeaders, b64challenge, "str")
-
-licence = ET.XML(res)[0][0].text
diff --git a/python/schemes/CanalPlusPL.py b/python/schemes/CanalPlusPL.py
new file mode 100644
index 0000000..4af43c4
--- /dev/null
+++ b/python/schemes/CanalPlusPL.py
@@ -0,0 +1,4 @@
+import xml.etree.ElementTree as ET
+challenge_with_cert = getChallenge('b64', Cdm.common_privacy_cert)
+licence = await corsFetch(licUrl, "POST", licHeaders, challenge_with_cert, "blob")
+licence = ET.fromstring(licence).find('.//{http://www.canal-plus.com/DRM/V1}license').text
\ No newline at end of file
diff --git a/python/schemes/PolSatBoxGo.py b/python/schemes/PolSatBoxGo.py
new file mode 100644
index 0000000..57552c3
--- /dev/null
+++ b/python/schemes/PolSatBoxGo.py
@@ -0,0 +1,4 @@
+body = loadBody('json')
+body['params']['object'] = getChallenge('b64', Cdm.common_privacy_cert)
+licence = await corsFetch(licUrl, "POST", licHeaders, body, "json")
+licence = licence['result']['object']['license']
diff --git a/python/schemes/Polsat.py b/python/schemes/Polsat.py
deleted file mode 100644
index cdadc05..0000000
--- a/python/schemes/Polsat.py
+++ /dev/null
@@ -1,6 +0,0 @@
-payload = loadBody("json")
-challengeB64 = base64.b64encode(challenge).decode()
-payload['params']['object'] = challengeB64
-res = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
-
-licence = res['result']['object']['license']
diff --git a/python/schemes/YouTube.py b/python/schemes/YouTube.py
new file mode 100644
index 0000000..f0f2b8a
--- /dev/null
+++ b/python/schemes/YouTube.py
@@ -0,0 +1,5 @@
+body = loadBody('json')
+challenge_with_cert = getChallenge('b64', Cdm.common_privacy_cert)
+body['licenseRequest'] = challenge_with_cert
+licence = await corsFetch(licUrl, "POST", licHeaders, body, "json")
+licence = licence['license'].replace("-", "+").replace("_", "/")
diff --git a/selectRules.conf b/selectRules.conf
index 513d51e..7e0a45a 100644
--- a/selectRules.conf
+++ b/selectRules.conf
@@ -4,20 +4,20 @@ comcast.net/license$$Comcast
lic.staging.drmtoday$$DRMToday
lic.drmtoday.com$$DRMToday
corusappservices.com/authorization/widevine/getresourcekey$$GlobalTV
-b2c-www.redefine.pl/rpc/drm$$Polsat
+b2c-www.redefine.pl/rpc/drm/$$PolSatBoxGo
widevine.entitlement.eu.theplatform.com$$thePlatform
cdp/catalog/GetPlaybackResources$$Amazon
drm-license.youku.tv$$Youku
NOS71ZV1/wvls$$NosTV
license.vdocipher.com/auth$$VdoCipher
-zones/cppol/devices/31/apps/1/jobs/GetLicence$$CanalPlus
-secure-gen-hapi.canal-plus.com/conso/view$$CanalPlus2
+secure-gen-hapi.canal-plus.com/conso/view$$CanalPlusPL
widevine-proxy.drm.technology/proxy$$VUDRM
widevine-license.vudrm.tech/proxy$$VUDRM
motv.eu/widevine_proxy$$moTV
mw.tvnsul.com.br/widevine_proxy$$moTV
vodafone.com/vtv/ccursession/v1/start$$Vodafone
api.oqee.net/api/v1/avod/license$$oqee
+youtubei/v1/player/get_drm_license$$YouTube
contentlicenseservice/v1/licenses
media-license-server/validate-auth-token
wv-keyos.licensekeyserver
@@ -34,4 +34,4 @@ widevine-proxy
licenseManager.do
widevine
license
-cenc
+cenc
\ No newline at end of file
diff --git a/style.css b/style.css
index c880141..d8dfb53 100644
--- a/style.css
+++ b/style.css
@@ -1,114 +1,192 @@
-.hidden {
+body {
+ background: linear-gradient(to bottom, rgb(14, 116, 144), rgb(21, 94, 117), rgb(22, 78, 99));
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+}
+
+#updateNoticeExtension {
display: none;
+ justify-content: center;
+ align-items: center;
+ gap: 2%;
+ color: black;
}
-html, body {
- display: grid;
+#updateNoticeExtension a {
+ text-decoration: none;
+ color: white;
+}
+
+#ckHome {
+ flex-direction: column;
+ align-items: center;
height: 100%;
width: 100%;
- margin: 0; /* Reset default margin */
- padding: 0; /* Reset default padding */
}
-body {
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center;
- background: linear-gradient(45deg, #0d364c, #062535, #02141e);
- grid-template-rows: auto 1fr auto;
+#h3, label {
+ flex-shrink: 1;
}
-#noEME {
- justify-self: center;
- align-self: center;
+#ckResult {
+ width: 70%;
+ height: 50%;
+ overflow: hidden;
+ resize: none;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.5);
+ border-radius: 1%;
+ outline: none;
color: white;
}
-#updateNotice {
+#wvForm {
+ flex-direction: column;
+ align-self: center;
justify-self: center;
- align-self: end;
- color: white;
+ width: 100%;
+ height: 100%;
+ gap: 1%;
}
-#updateNotice a{
- color: aqua;
+#wvHome {
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
}
-#wvForm {
- display: grid;
- grid-template-rows: auto;
+
+#history {
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+ overflow-x: auto;
+}
+
+#histButtons {
+ flex-shrink: 1;
+}
+
+#histDisp {
+ flex-grow: 1;
+}
+
+#selectPssh {
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+}
+
+#selectRequest {
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+}
+
+#requestList {
+ overflow-y: scroll;
+ background-color: rgba(0, 0, 0, 0.5);
+ border-radius: 1%;
+ outline: none;
color: white;
+ padding: 2%;
+ width: 100%;
+ height: 100%;
}
-#wvForm label {
- justify-self: center;
+#psshList {
+ overflow-y: scroll;
+ background-color: rgba(0, 0, 0, 0.5);
+ border-radius: 1%;
+ outline: none;
+ color: white;
+ padding: 2%;
+ width: 100%;
+ height: 100%;
}
-#pssh {
- width: 80%;
- justify-self: center;
+#noEME {
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+ text-align: center;
+ color: white;
}
-#psshButton {
- width: 20%;
- justify-self: center;
+#wvHomePSSHLines {
+ display: flex;
+ flex-direction: row;
+ color: black;
+ gap: 1%;
}
-#license {
- width: 80%;
- justify-self: center;
+#pssh {
+ flex-grow: 1;
}
-#licenseButton {
- width: 20%;
- justify-self: center;
+#wvHomeLicenseLine {
+ color: black;
+ flex-direction: row;
+ display: flex;
+ gap: 1%;
}
-#scheme {
- width: 80%;
- justify-self: center;
+#license {
+ flex-grow: 1;
}
-#toggleHistory {
- display: grid;
+#wvHomeSchemeLine {
+ display: flex;
+ flex-direction: row;
+ color: black;
+ gap: 1%;
}
-#toggleHistory button {
- width: 20%;
- height: auto;
+#scheme {
+ flex-grow: 1;
}
-#guess {
- width: 20%;
+#wvHomeResultLine {
+ display: flex;
justify-self: center;
- margin-top: 5%;
+ align-items: center;
+ flex-direction: column;
+ gap: 1%;
}
#result {
- width: 90%;
- overflow-y: scroll;
- overflow-x: hidden;
resize: none;
- justify-self: center;
-}
-
-#psshList, #requestList {
+ background-color: rgba(0, 0, 0, 0.5);
+ border-radius: 1%;
+ outline: none;
+ width: 60%;
+ text-align: center;
color: white;
}
-#ckHome h3, label {
- color: white;
- justify-self: center;
+.json-container {
+ display: flex;
+ flex-direction: column;
+ color: black !important;
+ background-color: unset !important;
}
+.json-key {
+ color:black !important;
-#ckHome label {
- align-self: end;
}
-
-#ckResult {
- width: 90%;
- overflow-y: scroll;
- overflow-x: hidden;
- resize: none;
- justify-self: center;
-}
\ No newline at end of file
+.json-boolean{
+ color:yellow !important;
+}
+.json-container .json-string{
+ color:white !important;
+}
+.json-container .fa-caret-down{
+ border-color:white rgba(0,0,0,0) !important;
+}
+.json-container .fa-caret-right{
+ border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) white !important;
+}