Exemple #1
0
static inline u32 get_isocache_magic(void)
{
    u32 version;

    version = sctrlHENGetVersion() & 0xF;
    version = (version << 16) | sctrlHENGetMinorVersion();
    version += 0xC01DB15D;

    return version;
}
Exemple #2
0
//entry point
int main(int argc, char * argv[])
{
	pspDebugScreenInit();

	psp_fw_version = sceKernelDevkitVersion();

#if defined(CONFIG_660) || defined(CONFIG_661)
	if((psp_fw_version == FW_660) || (psp_fw_version == FW_661)) {
		goto version_OK;
	}
#endif

#ifdef CONFIG_639
	if(psp_fw_version == FW_639) {
		goto version_OK;
	}
#endif

#ifdef CONFIG_620
	if(psp_fw_version == FW_620) {
		goto version_OK;
	}
#endif

#ifdef CONFIG_635
	if(psp_fw_version == FW_635) {
		goto version_OK;
	}
#endif

	pspDebugScreenPrintf("Sorry. This program doesn't support your FW(0x%08X).\n", (uint)psp_fw_version);
	sceKernelDelayThread(5*1000000);
	goto exit;

version_OK:
	setup_patch_offset_table(psp_fw_version);
	
	//puzzle installer path
	strcpy(installerpath, argv[0]);

	char * slash = strrchr(installerpath, '/');
	if (slash) slash[1] = '\0';
	
	write_files(installerpath);
	strcat(installerpath, "installer.prx");

	printk_init("ms0:/launcher.txt");
	printk("Hello exploit\n");

	if(sctrlHENGetVersion() >= 0) {
		install_in_cfw();

		return 0;
	}

#if defined(CONFIG_660) || defined(CONFIG_661)
	if((psp_fw_version == FW_660) || (psp_fw_version == FW_661)) {
		do_exploit_660();
	}
#endif

#ifdef CONFIG_639
	if(psp_fw_version == FW_639) {
		do_exploit_639();
	}
#endif

#if defined(CONFIG_620) || defined(CONFIG_635)
	if(psp_fw_version == FW_620 || psp_fw_version == FW_635) {
		do_exploit();
	}
#endif

exit:
	//trigger reboot
	sceKernelExitGame();

	//kill thread
	sceKernelExitDeleteThread(0);

	//return
	return 0;
}