Switch Game Checker

Hi there!
Russian-speaking community presents a small bat-script to check the integrity of NSP and XCI, and generates MD5.
The instruction is in the readme file.
Dev @xHR

Added script version on bash
Dev ijwfly

https://github.com/rashevskyv/switch_game_checker

The biggest thanks in the world: @SciresM

Check_Fuuu.png Check_Good.png
 
Last edited by Skonikol,

cowboys4life88

Member
Newcomer
Joined
Aug 19, 2017
Messages
14
Trophies
0
Age
46
XP
166
Country
United States
[QUOTE = "Sharinflan, post: 8398427, member: 378390"] если мы преобразуем xci в nsp, он все еще сможет проверить nsp на ошибки и код кирпича? Или он только проверяет, что это законный nsp, если это демпфированная цифровая версия?[/ЦИТАТА]

Perfect its working now. Thank you00
 
  • Like
Reactions: Skonikol

Grand-Master

Well-Known Member
Newcomer
Joined
Oct 1, 2018
Messages
85
Trophies
0
Age
31
Location
God bless you!
Website
www.instagram.com
XP
216
Country
United States

Skonikol

Well-Known Member
OP
Member
Joined
May 25, 2017
Messages
119
Trophies
0
Age
41
Location
Muhosransk
XP
566
Country
Russia
Yup. Got check_nsp.bat, check_nsp.sh, fciv.exe, hactool.exe, keys.txt and PleaseDontTouchAnything.nsp, all inside a folder named "checker" on the Desktop.
Perhaps your nsp is not defined as nsp, I have this happens with not fully downloaded dumps, for example.
 

Bigjokker

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
98
Trophies
0
Age
47
XP
356
Country
United States
If we convert a xci to nsp, will it still be able to verify the nsp for errors and brick code? Or does it only check it's a legit nsp if it's the dumped digital version?

Converting xci to nsp or nsp to xci will not change the integrity of the nca files they contain. Game will still verify with a GOOD signature.

Only if the nca files are extracted and tampered with, then rebuilt. Then the game will FAIL the signature verification.


EDIT: Converted game will Fail signature check.
 
Last edited by Bigjokker,
  • Like
Reactions: Deleted User

Skonikol

Well-Known Member
OP
Member
Joined
May 25, 2017
Messages
119
Trophies
0
Age
41
Location
Muhosransk
XP
566
Country
Russia
Converting xci to nsp or nsp to xci will not change the integrity of the nca files they contain. Game will still verify with a GOOD signature.

Only if the nca files are extracted and tampered with, then rebuilt. Then the game will FAIL the signature verification.

What tool should be used for conversion without loss of integrity and signature?
90CDF166-702B-4D6B-8374-D4A8336C2952.jpeg E3C8EF85-EAD8-4B7F-AF77-F1EF64D6994E.jpeg 0B61824F-49E9-4648-B621-C1AEE7FA9452.jpeg
 
Last edited by Skonikol,

Bigjokker

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
98
Trophies
0
Age
47
XP
356
Country
United States
Last edited by Bigjokker,

Bigjokker

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
98
Trophies
0
Age
47
XP
356
Country
United States
Based off "Switch Game Checker" this bat checks signatures of all NCA files in game.

Tests XCI, NSP, and NCA files. Drag game onto "verify_GAME.bat".

Code:
@echo off
color 0A
title verify_GAME.bat
CD /d "%~dp0"
if not exist hactool.exe echo :: Place hactool.exe in folder with verify_GAME.bat!
if not exist hactool.exe echo.
if not exist hactool.exe pause
if not exist hactool.exe exit
if not exist keys.txt echo :: Place Keys.txt in folder with verify_GAME.bat!
if not exist keys.txt echo.
if not exist keys.txt pause
if not exist keys.txt exit
if exist temp.txt del temp.txt
if "%~x1"==".nca" goto nca
if exist NCA_files RD /S /Q NCA_files
set file="%~1"
if "%~x1"==".xci" goto xci
if not "%~x1"==".nsp" echo :: Drag only XCI, NSP, or NCA files onto verify_GAME.bat!
if not "%~x1"==".nsp" echo.
if not "%~x1"==".nsp" pause
if not "%~x1"==".nsp" exit
hactool -k keys.txt -t pfs0 -x --outdir=NCA_files %file%
cls
goto dun
:xci
hactool -k keys.txt -t xci -x --securedir=NCA_files %file%
cls
:dun
for %%I in ("NCA_files\*.nca") do set nca=%%I& set nca2=%%~nxI& call :sub
if exist NCA_files RD /S /Q NCA_files
if exist temp.txt del temp.txt
echo.
certUtil -hashfile "%~dpnx1" MD5 >temp.txt
(
set /p var1=
set /p MD5=
)<temp.txt
echo ------------------------------------------------------------------------------------------------------------------------
echo.
echo :: %~nx1
echo :: MD5: %MD5%
echo.
echo ------------------------------------------------------------------------------------------------------------------------
if exist temp.txt del temp.txt
echo.
pause
if not exist verify_GAME.bat findstr "verify_GAME.bat" *.bat>log.txt
if exist verify_GAME.bat goto skippy
(
set /P bat=
)<log.txt
del log.txt
set nbat=%bat:~0,-22%
ren "%nbat%" verify_GAME.bat
:skippy
exit
:sub
if exist temp.txt del temp.txt
hactool -k keys.txt -t nca --verify %nca% >temp.txt 2>&1
if "%skip%"=="yes" goto skip
echo.
echo :: Checking if game contains Original files!
echo    ------------------------------------------
set skip=yes
:skip
echo.
findstr /I /C:"Fixed-Key Signature (GOOD)" temp.txt >nul 2>&1
if "%errorlevel%"=="0" echo :: Fixed-Key Signature (GOOD) - %nca2%& echo :: This NCA file is Original!& goto :eof
echo :: Fixed-Key Signature (FAIL) - %nca2%
echo :: NCA file has been Modified. Use at your own risk!
goto :eof
:nca
for %%I in ("%~dp1*.nca") do set nca=%%I& set nca2=%%~nxI& call :sub
if exist NCA_files RD /S /Q NCA_files
if exist temp.txt del temp.txt
echo.
pause
if not exist verify_GAME.bat findstr "verify_GAME.bat" *.bat>log.txt
if exist verify_GAME.bat goto skippy1
(
set /P bat=
)<log.txt
del log.txt
set nbat=%bat:~0,-22%
ren "%nbat%" verify_GAME.bat
:skippy1
exit
 

Attachments

  • verify_GAME.rar
    788 bytes · Views: 333
Last edited by Bigjokker,
D

Deleted User

Guest
Did you get errorlog files?
No, no new files appear on the folder.
Based off "Switch Game Checker" this bat checks signatures of all NCA files in game.

Tests XCI, NSP, and NCA files. Drag game onto "verify_GAME.bat".

Code:
@echo off
color 0A
title verify_GAME.bat
CD /d "%~dp0"
if not exist hactool.exe echo :: Place hactool.exe in folder with verify_GAME.bat!
if not exist hactool.exe echo.
if not exist hactool.exe pause
if not exist hactool.exe exit
if not exist keys.txt echo :: Place Keys.txt in folder with verify_GAME.bat!
if not exist keys.txt echo.
if not exist keys.txt pause
if not exist keys.txt exit
if exist temp.txt del temp.txt
if "%~x1"==".nca" goto nca
if exist NCA_files RD /S /Q NCA_files
set file="%~1"
if "%~x1"==".xci" goto xci
if not "%~x1"==".nsp" echo :: Drag only XCI, NSP, or NCA files onto verify_GAME.bat!
if not "%~x1"==".nsp" echo.
if not "%~x1"==".nsp" pause
if not "%~x1"==".nsp" exit
hactool -k keys.txt -t pfs0 -x --outdir=NCA_files %file%
cls
goto dun
:xci
hactool -k keys.txt -t xci -x --securedir=NCA_files %file%
cls
:dun
for %%I in ("NCA_files\*.nca") do set nca=%%I& set nca2=%%~nxI& call :sub
if exist NCA_files RD /S /Q NCA_files
if exist temp.txt del temp.txt
echo.
certUtil -hashfile "%~dpnx1" MD5 >temp.txt
(
set /p var1=
set /p MD5=
)<temp.txt
echo ------------------------------------------------------------------------------------------------------------------------
echo.
echo :: %~nx1
echo :: MD5: %MD5%
echo.
echo ------------------------------------------------------------------------------------------------------------------------
if exist temp.txt del temp.txt
echo.
pause
exit
:sub
if exist temp.txt del temp.txt
hactool -k keys.txt -t nca --verify %nca% >temp.txt 2>&1
if "%skip%"=="yes" goto skip
echo.
echo :: Checking if game contains Original files!
echo    ------------------------------------------
set skip=yes
:skip
echo.
findstr /I /C:"Fixed-Key Signature (GOOD)" temp.txt >nul 2>&1
if "%errorlevel%"=="0" echo :: Fixed-Key Signature (GOOD) - %nca2%& echo :: This NCA file is Original!& goto :eof
echo :: Fixed-Key Signature (FAIL) - %nca2%
echo :: NCA file has been Modified. Use at your own risk!
goto :eof
:nca
for %%I in ("%~dp1*.nca") do set nca=%%I& set nca2=%%~nxI& call :sub
if exist NCA_files RD /S /Q NCA_files
if exist temp.txt del temp.txt
echo.
pause
exit
cmd opens, some green text appears during a split second and then I get an empty cmd window just standing there doing nothing. I've put the file and game on the same folder as check_nsp.bat
 
Last edited by ,

xHR

Well-Known Member
Member
Joined
Apr 20, 2013
Messages
125
Trophies
1
Age
36
Website
twitter.com
XP
1,001
Country
No, no new files appear on the folder.

cmd opens, some green text appears during a split second and then I get an empty cmd window just standing there doing nothing. I've put the file and game on the same folder as check_nsp.bat
Use latest version of script. And show us your folder structure.
 

jamie75

New Member
Newbie
Joined
Nov 29, 2018
Messages
2
Trophies
0
Age
48
XP
57
Country
United Kingdom
Hi

i get the following with every game:

[warn]: failed to match key "encrypted_header_key", (value "lots of numbers")
[warn]: failed to match key "eticket_rsa_kek", )value "lots of numbers")


i get this in the check.log file

[WARN] prod.keys does not exist.

however for the 2 games that i have tested i also get a GOOD_filename MD5

is this ok?

Thanks for the help
 

xHR

Well-Known Member
Member
Joined
Apr 20, 2013
Messages
125
Trophies
1
Age
36
Website
twitter.com
XP
1,001
Country
Hi

i get the following with every game:

[warn]: failed to match key "encrypted_header_key", (value "lots of numbers")
[warn]: failed to match key "eticket_rsa_kek", )value "lots of numbers")


i get this in the check.log file

[WARN] prod.keys does not exist.

however for the 2 games that i have tested i also get a GOOD_filename MD5

is this ok?

Thanks for the help
Do not pay attention to WARNs

Is GOOD is not enought for you? I can change it for AWESOME
 
  • Like
Reactions: mathew77

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-