Update device id func
This commit is contained in:
parent
3ef21d003a
commit
4f96defd31
|
@ -181,7 +181,7 @@ const PrepareKeyRequest = (address) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const LoadDeviceRSAKey = (address, name) => {
|
const LoadDeviceRSAKey = (address, name) => {
|
||||||
// wvcdm::OEMCrypto::LoadDeviceRSAKey
|
// wvdash::OEMCrypto::LoadDeviceRSAKey
|
||||||
Interceptor.attach(address, {
|
Interceptor.attach(address, {
|
||||||
onEnter: function (args) {
|
onEnter: function (args) {
|
||||||
if (!args[6].isNull()) {
|
if (!args[6].isNull()) {
|
||||||
|
@ -233,22 +233,22 @@ const getKeyLength = (key) => {
|
||||||
return pos + lengthValue;
|
return pos + lengthValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GetDeviceId = (address, name) => {
|
const GetDeviceID = (address, name) => {
|
||||||
// wvcdm::Properties::GetCdmClientPropertySet
|
// wvdash::OEMCrypto::GetDeviceID
|
||||||
Interceptor.attach(address, {
|
Interceptor.attach(address, {
|
||||||
onEnter: function (args) {
|
onEnter: function (args) {
|
||||||
print(Level.DEBUG, '[+] onEnter: getOemcryptoDeviceId');
|
print(Level.DEBUG, '[+] onEnter: GetDeviceID');
|
||||||
this.data = args[0];
|
this.data = args[0];
|
||||||
this.size = args[1];
|
this.size = args[1];
|
||||||
},
|
},
|
||||||
onLeave: function (retval) {
|
onLeave: function (retval) {
|
||||||
print(Level.DEBUG, '[-] onLeave: getOemcryptoDeviceId');
|
print(Level.DEBUG, '[-] onLeave: GetDeviceID');
|
||||||
try {
|
try {
|
||||||
const size = Memory.readPointer(this.size).toInt32();
|
const size = Memory.readPointer(this.size).toInt32();
|
||||||
const data = Memory.readByteArray(this.data, size);
|
const data = Memory.readByteArray(this.data, size);
|
||||||
data && send('client_id', data);
|
data && send('client_id', data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(Level.ERROR, `Failed to dump device Id.`);
|
print(Level.ERROR, `Failed to dump device ID.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -289,7 +289,7 @@ const hookLibrary = (name) => {
|
||||||
} else if (funcName.includes('PrepareKeyRequest')) {
|
} else if (funcName.includes('PrepareKeyRequest')) {
|
||||||
PrepareKeyRequest(funcAddr);
|
PrepareKeyRequest(funcAddr);
|
||||||
} else if (funcName.includes('getOemcryptoDeviceId')) {
|
} else if (funcName.includes('getOemcryptoDeviceId')) {
|
||||||
GetDeviceId(funcAddr);
|
GetDeviceID(funcAddr);
|
||||||
} else if (targets.includes(funcName) || (!targets.length && funcName.match(/^[a-z]+$/))) {
|
} else if (targets.includes(funcName) || (!targets.length && funcName.match(/^[a-z]+$/))) {
|
||||||
LoadDeviceRSAKey(funcAddr, funcName);
|
LoadDeviceRSAKey(funcAddr, funcName);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue