From 65d26ebaba4de62ea3d3bc6c9ff499394b8bd001 Mon Sep 17 00:00:00 2001 From: "AtelierWindows\\SilicaAndPina" Date: Mon, 10 Dec 2018 13:37:15 +1300 Subject: [PATCH] no message --- CMakeLists.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ noWhitelist.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 LICENSE create mode 100644 noWhitelist.c diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..824c5bf --- /dev/null +++ b/CMakeLists.txt @@ -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 +) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9cdff5b --- /dev/null +++ b/LICENSE @@ -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. diff --git a/noWhitelist.c b/noWhitelist.c new file mode 100644 index 0000000..92a5874 --- /dev/null +++ b/noWhitelist.c @@ -0,0 +1,42 @@ +//NoWhitelist +//Completely disable the PSTV Whitelist! + +#include +#include +#include +#include +#include +#include +#include +#include + +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; +}