Skip to content

Commit

Permalink
Fix issue with ConsoleID Spoofers
Browse files Browse the repository at this point in the history
  • Loading branch information
LiEnby committed Feb 17, 2024
1 parent c82a287 commit 6e59346
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 0 additions & 4 deletions user/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ int module_start(SceSize args, void *argp) {
ret = taiGetModuleInfo("ScePspemu", &tai_info);
if (ret >= 0){
pspemu = 1;
//sceClibPrintf("[NoPspEmuDrm_user] starting in pspemu\n");
return pspemu_module_start(tai_info);
}

ret = taiGetModuleInfo("SceShell", &tai_info);
if (ret >= 0){
sceshell = 1;
//sceClibPrintf("[NoPspEmuDrm_user] starting in sceshell\n");
return sceshell_module_start(tai_info);
}

//sceClibPrintf("[NoPspEmuDrm_user] exiting (not pspemu or shell)\n");


return SCE_KERNEL_START_NO_RESIDENT;
Expand Down
19 changes: 14 additions & 5 deletions user/PspNpDrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@

#include <vitasdk.h>


int get_real_console_id(char* console_id_out) {
// workaround console id spoofers; read IDPS from idstorage

char idstorage_leaf[0x200];
int ret = vshIdStorageReadLeaf(0x01, idstorage_leaf);
if(ret < 0) return ret;
memcpy(console_id_out, idstorage_leaf + 0x60, 0x10);

return 0;
}

int is_offical_rif(PspRif* rif){
for(int i = 0; i < 0x28; i++) {
if(rif->ecdsaSig[i] != 0xff) {
Expand Down Expand Up @@ -70,14 +82,11 @@ int gen_versionkey(char* versionkey, int keyindex)

void get_act_key(char* key_out, char* encrypted_act_key, int count){
char decKey[0x10];
char idps[32];

// get idps
_vshSblAimgrGetConsoleId(idps);
char idps[0x10];

get_real_console_id(idps);
aes_encrypt_out(decKey, PSP_ACT_AES, idps);


for (int i = 0; i < count; i++){
aes_decrypt_out(key_out, encrypted_act_key, decKey);
}
Expand Down

0 comments on commit 6e59346

Please sign in to comment.