1. cowboys4life88

    Newcomer

    Joined:
    Aug 19, 2017
    Messages:
    14
    Country:
    United States
    Perfect its working now. Thank you00
     
    Skonikol likes this.
  2. xHR

    xHR GBAtemp Regular
    Member

    Joined:
    Apr 20, 2013
    Messages:
    116
    Country:
  3. cowboys4life88

    Newcomer

    Joined:
    Aug 19, 2017
    Messages:
    14
    Country:
    United States
    0
    Sorry I had misread that part, so glad I shared the file structure so I could be corrected. Thanks
     
    xHR and Skonikol like this.
  4. Deleted User

    Deleted User Newbie

    Nope. PleaseDontTouchAnything.nsp
     
  5. xHR

    xHR GBAtemp Regular
    Member

    Joined:
    Apr 20, 2013
    Messages:
    116
    Country:
    Do you have hactool near the script?
     
  6. Grand-Master

    Grand-Master Advanced Member
    Newcomer

    Joined:
    Oct 1, 2018
    Messages:
    85
    Country:
    United States
    Retromania, xHR and Skonikol like this.
  7. Deleted User

    Deleted User Newbie

    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.
     
    Tommy084 likes this.
  8. Skonikol

    OP Skonikol GBAtemp Regular
    Member

    Joined:
    May 25, 2017
    Messages:
    115
    Country:
    Russia
    Perhaps your nsp is not defined as nsp, I have this happens with not fully downloaded dumps, for example.
     
  9. Bigjokker

    Bigjokker GBAtemp Regular
    Member

    Joined:
    Jan 4, 2015
    Messages:
    115
    Country:
    United States
    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, Nov 27, 2018
    Deleted User likes this.
  10. Skonikol

    OP Skonikol GBAtemp Regular
    Member

    Joined:
    May 25, 2017
    Messages:
    115
    Country:
    Russia
    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, Nov 27, 2018
  11. Deleted User

    Deleted User Newbie

    Tried with 2 other games, same thing happens.
     
  12. Bigjokker

    Bigjokker GBAtemp Regular
    Member

    Joined:
    Jan 4, 2015
    Messages:
    115
    Country:
    United States
    I used HacPack to convert XCIs NCA files to NSP and sig still good. But now that I'm thinking about it the file may not work. *Update* Does not run.

    When converted with 4nxci the sig does fail.

    EDIT: Converting files does modify NCA files and cause a signiture fail when verifying.
     
    Last edited by Bigjokker, Nov 27, 2018
  13. mattytrog

    mattytrog You don`t want to listen to anything I say.
    Member

    Joined:
    Apr 27, 2018
    Messages:
    3,708
    Country:
    United Kingdom
    In Soviet Russia, NAND bricks NSP
     
    mathew77, Skonikol and Ty_ like this.
  14. Bigjokker

    Bigjokker GBAtemp Regular
    Member

    Joined:
    Jan 4, 2015
    Messages:
    115
    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
    
     

    Attached Files:

    Last edited by Bigjokker, Dec 3, 2018
    SaffronXL, xHR and whateverg1012 like this.
  15. sergux

    sergux GBAtemp Regular
    Member

    Joined:
    Jul 14, 2018
    Messages:
    108
    Country:
    Afghanistan
    thanks for sharing this :D
     
  16. xHR

    xHR GBAtemp Regular
    Member

    Joined:
    Apr 20, 2013
    Messages:
    116
    Country:
    Did you get errorlog files?
     
  17. Deleted User

    Deleted User Newbie

    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
     
    Last edited Nov 28, 2018
  18. xHR

    xHR GBAtemp Regular
    Member

    Joined:
    Apr 20, 2013
    Messages:
    116
    Country:
    Use latest version of script. And show us your folder structure.
     
  19. jamie75

    jamie75 Newbie
    Newcomer

    Joined:
    Nov 29, 2018
    Messages:
    2
    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
     
  20. xHR

    xHR GBAtemp Regular
    Member

    Joined:
    Apr 20, 2013
    Messages:
    116
    Country:
    Do not pay attention to WARNs

    Is GOOD is not enought for you? I can change it for AWESOME
     
    mathew77 likes this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Checker, Switch,