commit
65d26ebaba
@ -0,0 +1,50 @@ |
||||
cmake_minimum_required(VERSION 2.8) |
||||
|
||||
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) |
||||
if(DEFINED ENV{VITASDK}) |
||||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file") |
||||
else() |
||||
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!") |
||||
endif() |
||||
endif() |
||||
|
||||
project(noWhitelist) |
||||
include("$ENV{VITASDK}/share/vita.cmake" REQUIRED) |
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-q -Wall -O3 -std=gnu99") |
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostdlib") |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions") |
||||
|
||||
link_directories( |
||||
${CMAKE_CURRENT_BINARY_DIR} |
||||
) |
||||
|
||||
add_executable(${PROJECT_NAME} |
||||
noWhitelist.c |
||||
) |
||||
|
||||
target_link_libraries(${PROJECT_NAME} |
||||
k |
||||
SceSysmemForDriver_stub |
||||
SceThreadmgrForDriver_stub |
||||
SceIofilemgrForDriver_stub |
||||
SceDebugForDriver_stub |
||||
taihenForKernel_stub |
||||
gcc |
||||
) |
||||
vita_create_self(${PROJECT_NAME}.skprx ${PROJECT_NAME} |
||||
UNSAFE |
||||
CONFIG ${CMAKE_SOURCE_DIR}/exports.yml |
||||
) |
||||
vita_create_stubs(${PROJECT_NAME}-stubs ${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/exports.yml |
||||
KERNEL |
||||
) |
||||
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-stubs/ |
||||
DESTINATION lib |
||||
FILES_MATCHING PATTERN "*.a" |
||||
) |
||||
|
||||
install(FILES savestates.h |
||||
DESTINATION include |
||||
) |
@ -0,0 +1,21 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2017 Silica |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
@ -0,0 +1,42 @@ |
||||
//NoWhitelist
|
||||
//Completely disable the PSTV Whitelist!
|
||||
|
||||
#include <stdio.h> |
||||
#include <stdarg.h> |
||||
#include <string.h> |
||||
#include <psp2kern/kernel/modulemgr.h> |
||||
#include <psp2kern/kernel/threadmgr.h> |
||||
#include <psp2kern/kernel/sysmem.h> |
||||
#include <psp2kern/kernel/cpu.h> |
||||
#include <taihen.h> |
||||
|
||||
static int hook = -1; |
||||
static tai_hook_ref_t ref_hook; |
||||
|
||||
static int ksceRegMgrGetKeyInt_patched(const char* category, const char* name, int* buf) { |
||||
int ret = TAI_CONTINUE(int,ref_hook,category,name,buf); |
||||
if(strcmp(name,"launch_check") == 0) |
||||
{ |
||||
//ksceDebugPrintf("Spoofing Launch Check\n",category,name,*buf,ret);
|
||||
*buf = 1;
|
||||
return 0x00; |
||||
} |
||||
return ret; |
||||
}
|
||||
void _start() __attribute__ ((weak, alias ("module_start"))); |
||||
int module_start(SceSize argc, const void *args) |
||||
{ |
||||
hook = taiHookFunctionExportForKernel(KERNEL_PID, |
||||
&ref_hook,
|
||||
"SceRegistryMgr", |
||||
TAI_ANY_LIBRARY, |
||||
0x16DDF3DC, //ksceRegMgrGetKeyInt
|
||||
ksceRegMgrGetKeyInt_patched); |
||||
return SCE_KERNEL_START_SUCCESS; |
||||
} |
||||
|
||||
int module_stop(SceSize argc, const void *args) |
||||
{ |
||||
if (hook >= 0) taiHookReleaseForKernel(hook, ref_hook);
|
||||
return SCE_KERNEL_STOP_SUCCESS; |
||||
} |
Reference in new issue