Skip to content

Commit

Permalink
update for new lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Kronos2308 committed Dec 14, 2019
1 parent 263e3cc commit 653858f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Hakupayload/src/utils/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ display_backlight_brightness(0, 1000);
g_gfx_con.scale = 3;
gfx_con_setpos(&g_gfx_con, 10, 10);
gfx_con_setcol(&g_gfx_con, 0xFF008F39, 0xFF726F68, 0xFF191414);
gfx_printf(&g_gfx_con, "BootStrapNX\n");
gfx_printf(&g_gfx_con, "BootStrapNX\n Haku33 has finish the Clean\n");
gfx_con_setcol(&g_gfx_con, 0xFFF9F9F9, 0, 0xFF191414);
gfx_con_setpos(&g_gfx_con, 950, 10);
gfx_printf(&g_gfx_con, "Battery: -%d%-", (battPercent >> 8) & 0xFF, (battPercent & 0xFF));
Expand Down
2 changes: 2 additions & 0 deletions compile.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ dir /b *.nro>%temp%\filete.txt
set /p File=<%temp%\filete.txt
del "%temp%\filete.txt"
title -%IP% - %File%
make -C Hakupayload/
cp ./Hakupayload/payload.bin ./romfs/Haku33_payload.bin -f -v
make
set a=%errorlevel%
echo ------------------------------------------
Expand Down
Binary file modified romfs/Haku33_payload.bin
Binary file not shown.
106 changes: 53 additions & 53 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ extern "C" {
using namespace std;

//traduction
bool isSpanish()
bool isSpanish = false;
void set_LANG()
{
setInitialize();
u64 lcode = 0;
s32 lang = 1;
SetLanguage lang;
setGetSystemLanguage(&lcode);
setMakeLanguage(lcode, &lang);
switch(lang)
{
case 5:
case 14:
return true;
isSpanish = true;
break;
default:
return false;
isSpanish = false;
break;
}
setsysExit();
return false;
}

//ask to the switch for the serial detect incognito
Expand Down Expand Up @@ -142,8 +142,8 @@ char *incognito(void) {
bool led_on(void)
{
Result rc=0;
size_t i;
size_t total_entries;
s32 i;
s32 total_entries;
u64 UniquePadIds[2];
HidsysNotificationLedPattern pattern;
hidsysExit();
Expand Down Expand Up @@ -181,7 +181,7 @@ char *incognito(void) {
bool HasConnection()
{
u32 strg = 0;
nifmInitialize();
nifmInitialize(NifmServiceType_Admin);
nifmGetInternetConnectionStatus(NULL, &strg, NULL);
nifmExit();
return (strg > 0);
Expand All @@ -199,66 +199,66 @@ bool install()
//terminate System proc
printf("\x1b[32;1m*\x1b[0m Kill System Services\n");
consoleUpdate(NULL);
pmshellTerminateProcessByTitleId(0x010000000000000C);//btca
pmshellTerminateProcessByTitleId(0x010000000000000E);//friends
pmshellTerminateProcessByTitleId(0x010000000000001E);//account
pmshellTerminateProcessByTitleId(0x010000000000001F);//ns
pmshellTerminateProcessByTitleId(0x0100000000000020);//nfc
pmshellTerminateProcessByTitleId(0x0100000000000022);//capsrv
pmshellTerminateProcessByTitleId(0x0100000000000024);//ssl
pmshellTerminateProcessByTitleId(0x0100000000000025);//nim
pmshellTerminateProcessByTitleId(0x010000000000002B);//erpt
pmshellTerminateProcessByTitleId(0x010000000000002E);//pctl
pmshellTerminateProcessByTitleId(0x010000000000002F);//npns
pmshellTerminateProcessByTitleId(0x0100000000000030);//eupld
pmshellTerminateProcessByTitleId(0x0100000000000033);//es
pmshellTerminateProcessByTitleId(0x0100000000000036);//creport
pmshellTerminateProcessByTitleId(0x010000000000003A);//migration
pmshellTerminateProcessByTitleId(0x010000000000003E);//olsc
pmshellTerminateProcessByTitleId(0x0100000000001000);//qlaunch - make freeze?
pmshellTerminateProcessByTitleId(0x0100000000001009);//miiEdit
pmshellTerminateProgram(0x010000000000000C);//btca
pmshellTerminateProgram(0x010000000000000E);//friends
pmshellTerminateProgram(0x010000000000001E);//account
pmshellTerminateProgram(0x010000000000001F);//ns
pmshellTerminateProgram(0x0100000000000020);//nfc
pmshellTerminateProgram(0x0100000000000022);//capsrv
pmshellTerminateProgram(0x0100000000000024);//ssl
pmshellTerminateProgram(0x0100000000000025);//nim
pmshellTerminateProgram(0x010000000000002B);//erpt
pmshellTerminateProgram(0x010000000000002E);//pctl
pmshellTerminateProgram(0x010000000000002F);//npns
pmshellTerminateProgram(0x0100000000000030);//eupld
pmshellTerminateProgram(0x0100000000000033);//es
pmshellTerminateProgram(0x0100000000000036);//creport
pmshellTerminateProgram(0x010000000000003A);//migration
pmshellTerminateProgram(0x010000000000003E);//olsc
pmshellTerminateProgram(0x0100000000001000);//qlaunch - make freeze?
pmshellTerminateProgram(0x0100000000001009);//miiEdit

//serv test may freeze
printf("\x1b[32;1m*\x1b[0m Kill Extra Services\n");
consoleUpdate(NULL);
/* pmshellTerminateProcessByTitleId(0x0100000000000020); //nfc
pmshellTerminateProcessByTitleId(0x0100000000000021); //psc
// pmshellTerminateProcessByTitleId(0x0100000000000023); //am make freeze
pmshellTerminateProcessByTitleId(0x0100000000000024); //ssl
pmshellTerminateProcessByTitleId(0x010000000000002E); //pctl
pmshellTerminateProcessByTitleId(0x010000000000002F); //npns
pmshellTerminateProcessByTitleId(0x0100000000000034); //fatal
// pmshellTerminateProcessByTitleId(0x0100000000000037); //ro make freeze
pmshellTerminateProcessByTitleId(0x0100000000000039); //sdb
pmshellTerminateProcessByTitleId(0x010000000000003E); //olsc
*/ pmshellTerminateProcessByTitleId(0x0100000000002071); //posi (ns)
pmshellTerminateProcessByTitleId(0x0100000000000809); //used by sdb
/* pmshellTerminateProgram(0x0100000000000020); //nfc
pmshellTerminateProgram(0x0100000000000021); //psc
// pmshellTerminateProgram(0x0100000000000023); //am make freeze
pmshellTerminateProgram(0x0100000000000024); //ssl
pmshellTerminateProgram(0x010000000000002E); //pctl
pmshellTerminateProgram(0x010000000000002F); //npns
pmshellTerminateProgram(0x0100000000000034); //fatal
// pmshellTerminateProgram(0x0100000000000037); //ro make freeze
pmshellTerminateProgram(0x0100000000000039); //sdb
pmshellTerminateProgram(0x010000000000003E); //olsc
*/ pmshellTerminateProgram(0x0100000000002071); //posi (ns)
pmshellTerminateProgram(0x0100000000000809); //used by sdb

//critical serv
printf("\x1b[32;1m*\x1b[0m terminate Critical Services\n");
consoleUpdate(NULL);
pmshellTerminateProcessByTitleId(0x0100000000000012);//bsdsockets - make switch freeze on sxos ftp
pmshellTerminateProcessByTitleId(0x0100000000000009);//settings - make switch freeze on airplane mode
pmshellTerminateProcessByTitleId(0x010000000000000F);//nifm
pmshellTerminateProcessByTitleId(0x0100000000000016);//Wlan
pmshellTerminateProgram(0x0100000000000012);//bsdsockets - make switch freeze on sxos ftp
pmshellTerminateProgram(0x0100000000000009);//settings - make switch freeze on airplane mode
pmshellTerminateProgram(0x010000000000000F);//nifm
pmshellTerminateProgram(0x0100000000000016);//Wlan

//terminate Homebrew Serv
printf("\x1b[32;1m*\x1b[0m Kill Homebrew Services\n");
consoleUpdate(NULL);
pmshellTerminateProcessByTitleId(0x420000000000000E);//FTP
pmshellTerminateProcessByTitleId(0x0100000000000352);//Emuiio
pmshellTerminateProcessByTitleId(0x200000000000010);//Lan Play
pmshellTerminateProcessByTitleId(0x0100000000000FAF);//HDI
pmshellTerminateProcessByTitleId(0x420000000000000B);//sysplay
pmshellTerminateProcessByTitleId(0x00FF0000636C6BFF);//sys-clk
pmshellTerminateProcessByTitleId(0x0100000000534C56);//ReverseNX
pmshellTerminateProcessByTitleId(0x0100000000000069);//ReiSpoof
pmshellTerminateProgram(0x420000000000000E);//FTP
pmshellTerminateProgram(0x0100000000000352);//Emuiio
pmshellTerminateProgram(0x200000000000010);//Lan Play
pmshellTerminateProgram(0x0100000000000FAF);//HDI
pmshellTerminateProgram(0x420000000000000B);//sysplay
pmshellTerminateProgram(0x00FF0000636C6BFF);//sys-clk
pmshellTerminateProgram(0x0100000000534C56);//ReverseNX
pmshellTerminateProgram(0x0100000000000069);//ReiSpoof

//mount system
printf("\x1b[32;1m*\x1b[0m mount system\n");
consoleUpdate(NULL);
FsFileSystem mySystem;
fsOpenBisFileSystem(&mySystem, FsBisStorageId_System, "");
fsOpenBisFileSystem(&mySystem, FsBisPartitionId_System, "");
fsdevMountDevice("myssytem", mySystem);
//delete system
printf("\x1b[32;1m*\x1b[0m Delete system\n");
Expand All @@ -277,7 +277,7 @@ bool install()
printf("\x1b[32;1m*\x1b[0m mount User\n");
consoleUpdate(NULL);
FsFileSystem myUser;
fsOpenBisFileSystem(&myUser, FsBisStorageId_User, "");
fsOpenBisFileSystem(&myUser, FsBisPartitionId_User, "");
fsdevMountDevice("myUser", myUser);
//delete user
printf("\x1b[32;1m*\x1b[0m delete User\n");
Expand Down Expand Up @@ -348,7 +348,7 @@ if (kHeld & KEY_PLUS)

consoleInit(NULL);
printf("\x1b[32;1m*\x1b[0m %s v%s Kronos2308, Hard Reset\n",TITLE, VERSION);
if(isSpanish())
if(isSpanish)
{
printf("\n\x1b[30;1m TU CONSOLA SERA COMPLETAMENTE LIMPADA: SAVES, JUEGOS, ETC \x1b[0m\n");
printf("\n\x1b[30;1m SE REALIZARA UN HARD RESET LUEGO SE APAGARA LA CONSOLA \x1b[0m\n");
Expand Down

0 comments on commit 653858f

Please sign in to comment.