Tutorial  Updated

How to remove fake tickets from NSP file ("Standard crypto" equivalent) [Ban Risk Mitigation]

Hello everyone!

Since both Tinfoil and SX Installer now (finally) support Standard Crypto Conversion natively, the method described in this thread no longer serves any practical purpose.
The method is still fully functional (using Nut 1.2, as it was gutted of most of its features after that), so have a go at it for educational purposes if you desire to do so.

We had hell of a good run! This method was the gold standard of not getting your Switch banned after installing NSPs for more than a year.
But mainstream adoption has always been the desired outcome, and I'm proud to say it has been achieved!

Stay safe out there, block Big-N's telemetry servers on your router, and have a good time gaming!


PsychOsmosis





______________________

Hello everyone!

It is widely thought that going online after installing a NSP with a fake ticket leads to an almost inevitable ban.

Some people have been bragging on the forum that they use a private method (using the SDK) to reencrypt the NSP file with "standard crypto" (like the XCI/cartridge games) instead of the "ticket rights" usually used for eShop titles.
Detailed below is a method to modify a NSP file by removing the fake title rights, rewriting the header to no longer use the ticket, and finally deleting the fake ticket, therefore leading to a theoretically reduced risk of ban, as your console will no longer have a fake ticket in its ticket blob and your installed eShop titles will no longer have a rights-ID that doesn't match your console ID. This method leads to the creation of a NSP file that is practically equivalent to one that as been repacked using "standard crypto" (which is a bit misleading in its own right as NSP files are not encrypted).


DO NOT USE THIS GUIDE IF YOU ABSOLUTELY DON'T WANT TO GET BANNED!
THERE IS NO GUARANTEE THIS WILL PREVENT YOU FROM BEING BANNED!
THIS METHOD LEADS TO A THEORETICAL REDUCTION OF THE BAN RISK!


This method should be used in conjunction with other ban risk reduction methods, such as disabling telemetry (EU) / blocking the telemetry servers in your router hosts file (EU citizens should do BOTH), using a whitelist-based custom DNS/firewall configuration, using creport (for people not on SXOS) and/or using Stealth Mode (for people on SXOS, because we don't have access to creport... :()


This guide is based on the awesome script "nut" by Blawar!
Without him, this method would not exist!!


I added a guide on how to block the telemetry (and other harmful) servers in post #10 below!!


Game updates NSP files should NOT be processed using this method if you apply the update on a XCI game (cartridge dump)!
The tickets in an update are actually 100% legit and are neither console-specific or account-specific!


If you have processed the base game NSP file (using this method) on which you want to apply the update to, it is debatable if you should process the update as well or not.
The creator of CDNSP believes you should not, while I think it might raise some red flags if you install an update with tickets on a game for which there is no ticket in your console's ticket blob.
Please be aware of this information and proceed as you see fit.




Update (October 22, 2018) :

The script no longer works when applied to DLCs as of 6.0.1 (and probably 6.0.0)! It still works on base games though!!
This is due to the anti-piracy measures implemented by Big-N in this firmware version.

Since DLCs always come from the eShop, and therefore always come with a ticket, there is some kind of online check made when you try to run a game after installing a ticketless DLC for it.
Furthermore, it seems that the check is made using one of the few servers I actually whitelist (game update server maybe?).

I still have to try applying the script on an update to see if it works in this case. I will update you guys when I've done so.




Prerequisites :

- Download nut from github (https://github.com/blawar/nut/) by using the "Clone or download" green button and choosing "Download as ZIP". Extract the ZIP archive.

- LOOK AT THE REQUIREMENTS FOR NUT ON THE GITHUB PAGE. You need to have Python3 installed, then you use pip to install some modules :
pip3 install colorama pyopenssl requests tqdm unidecode image bs4 urllib3 flask pyqt5

In my case, I had to update pip before I could install the other modules :
py -m pip install --upgrade pip

If you try to run it and you get a Python error that's due to a missing module, it should display the name of the module in the error log on the command line interface window.
If the command line window shuts down before you can read, read the troubleshooting part below in red, it will help you reading the error message.
Just run "pip3 install MODULE_NAME" as you did with the other modules above.

Configure your nut.conf (in the "conf" folder). In my case, I just disabled (set to false) the first four settings of the "download" section of "nut.default.conf".

- A copy of your Switch keys. If you don't have them, you need to find them on your own on the interwebs or extract them from your console. There are guides for that. The file must be named "keys.txt" and be located in the (incredibly funny default-named) "nut-master" folder you extracted from the ZIP.

- A game in the NSP file format. Place it in the nut-master folder. The file can be a scene release or a game obtained from the CDN. You CAN use nut to download games from the CDN, but I personally don't know how and this is not a "CDN download tutorial".

- Hactool should be updated to the latest release (1.2.0) in the bin subfolder of nut-master in order to support NSP packages containing > 15 files!



NOW AUTOMATED IN A BATCH FILE!! :toot:
Code updated: October 16, 2018.
Confirmed working with firmwares up to 6.2.0 (on any CFW that supports installing unsigned NSPs)!!


You still need the prerequisites listed above though. There's no way around that! ;)


Your .NSP must be located in the nut-master folder AND must contain the TitleID in the filename so nut can use it to rewrite the header of the .NCA!!

Well, the code just got a fair bit prettier thanks to
Bigjokker with two simple but brilliant variable changes!
Now, after placing the .NSP and the batch file in the nut-master folder, just drag & drop the .NSP onto the batch file and voilà, it does its magic!!

You should see the ASCII squirrel a total of three times in the command line window, but it does not necessarily mean it worked if you see this!
In your nut-master folder, a folder with the same name as your NSP will be created, the NSP will be deleted and a new NSP will be created (about 2.5 kilobytes smaller than the original, compare with a backup of the original!!).

If the behavior of the script is any different, IT DIDN'T WORK!!

Even if all of the above is true, it might not have worked!! If the first part fails, you will still have a modified NSP 2.5 kilobytes smaller than the original (but it will crash at launch and send a dirty error log to Big-N)!

You can verify if it works by removing the "REM " at the three instances where there is a "REM pause" in the code, so it says "pause" instead.

By doing this, the script will pause after every step (prompting you to press a key to continue) so you can see if there was a nut / Python3 / Windows CLI related error!
You can also remove the @Echo off if you're having issues but the script doesn't show any error to make troubleshooting easier for us.

EVERYBODY SHOULD DO THIS AT LEAST ONCE TO MAKE SURE NUT AND PYTHON ARE PROPERLY CONFIGURED!!!
If everything works as it should, you can revert back the script to its original form to re-automate the three steps together.


Code:
@echo off
SET "nutpy=%~dp0"
SET "filenam=%~n1"
if EXIST "%nutpy%%filenam%\" rmdir /s /q "%nutpy%%filenam%"
if NOT EXIST "%nutpy%backup\" mkdir "%nutpy%backup"
if NOT EXIST "%nutpy%backup\%filenam%.nsp" copy /v "%nutpy%%filenam%.nsp" "%nutpy%backup\%filenam%.nsp"
cd /d "C:\Windows"
py.exe "%nutpy%nut.py" --remove-title-rights "%filenam%.nsp"
REM pause
py.exe "%nutpy%nut.py" -x "%filenam%.nsp"
REM pause
cd /d "%nutpy%%filenam%"
del *.tik
del *.cert
cd /d "%nutpy%"
del "%filenam%.nsp"
cd /d "%nutpy%%filenam%"
set /a n=0
setlocal ENABLEDELAYEDEXPANSION
for %%i in (*) do (
    set /a n=n+1
    set files!n!=%%i
)
if !n! == 2 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%"
)
if !n! == 3 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%"
)
if !n! == 4 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%"
)
if !n! == 5 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%"
)
if !n! == 6 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%"
)
if !n! == 7 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%"
)
if !n! == 8 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%"
)
if !n! == 9 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%"
)
if !n! == 10 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%"
)
if !n! == 11 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%"
)
if !n! == 12 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%"
)
if !n! == 13 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%"
)
if !n! == 14 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%"
)
if !n! == 15 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%"
)
if !n! == 16 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%"
)
if !n! == 17 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%"
)
if !n! == 18 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%"
)
if !n! == 19 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%" "%nutpy%%filenam%\%files19%"
)
if !n! == 20 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%" "%nutpy%%filenam%\%files19%" "%nutpy%%filenam%\%files20%"
)
if !n! == 21 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%" "%nutpy%%filenam%\%files19%" "%nutpy%%filenam%\%files20%"  "%nutpy%%filenam%\%files21%"
)
if !n! == 22 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%" "%nutpy%%filenam%\%files19%" "%nutpy%%filenam%\%files20%"  "%nutpy%%filenam%\%files21%"  "%nutpy%%filenam%\%files22%"
)
if !n! == 23 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%" "%nutpy%%filenam%\%files19%" "%nutpy%%filenam%\%files20%"  "%nutpy%%filenam%\%files21%"  "%nutpy%%filenam%\%files22%"  "%nutpy%%filenam%\%files23%"
)
if !n! == 24 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%" "%nutpy%%filenam%\%files19%" "%nutpy%%filenam%\%files20%" "%nutpy%%filenam%\%files21%"  "%nutpy%%filenam%\%files22%"  "%nutpy%%filenam%\%files23%" "%nutpy%%filenam%\%files24%"
)
if !n! == 25 (
    "C:\Windows\py.exe" "%nutpy%nut.py" -c "%filenam%.nsp" "%nutpy%%filenam%\%files1%" "%nutpy%%filenam%\%files2%" "%nutpy%%filenam%\%files3%" "%nutpy%%filenam%\%files4%" "%nutpy%%filenam%\%files5%" "%nutpy%%filenam%\%files6%" "%nutpy%%filenam%\%files7%" "%nutpy%%filenam%\%files8%" "%nutpy%%filenam%\%files9%" "%nutpy%%filenam%\%files10%" "%nutpy%%filenam%\%files11%" "%nutpy%%filenam%\%files12%" "%nutpy%%filenam%\%files13%" "%nutpy%%filenam%\%files14%" "%nutpy%%filenam%\%files15%" "%nutpy%%filenam%\%files16%" "%nutpy%%filenam%\%files17%" "%nutpy%%filenam%\%files18%" "%nutpy%%filenam%\%files19%" "%nutpy%%filenam%\%files20%" "%nutpy%%filenam%\%files21%"  "%nutpy%%filenam%\%files22%"  "%nutpy%%filenam%\%files23%" "%nutpy%%filenam%\%files24%" "%nutpy%%filenam%\%files25%"
)
endlocal
REM pause



Troubleshooting script :


If you're having issues and want our help, run the following script on your NSP BEFORE AND AFTER running the method described above and provide us with the information this script displays.


Code:
@echo off
SET "nutpy=%~dp0"
SET "filenam=%~n1"
py.exe "%nutpy%nut.py" -i "%filenam%.nsp"
pause



Batch processing :


If you have a bunch of NSP files in a folder and some of them don't have the TitleKey in the filename, I understand that it would be a pain to process them one by one using the batch file (even though it takes only 2 seconds per file).

If you are in this situation, @Bigjokker has made another batch file that will process every NSP in a folder, even if the TitleKey is not in the filename!!

The code of his batch file is a bit above my skill level, so I cannot vouch 100% for it (since I understand about 85% of it), but the code looks fine and I trust the guy.
For the same reason, I cannot troubleshoot your issues and modify the code accordingly, so if you use his batch processing batch file (it might not be the most elegant way to call it, but it is what it is! :lol:), you'll have to see with him if you have problems with it.
You might want to test your setup of Python3 and nut with my batch file first (to see if everything works properly) since it has been tested by more people since its release and then switch to @Bigjokker 's batch file if all goes well.

Here'a a link to his post where you can download his file!




Manual Method :

No longer kept up to date, but it should still work if you don't want to use the above script for whatever reason.

- Copy your NSP file in the "nut-master" folder.

- (OPTIONAL) Use the following command to pull the info of your NSP file. This is not required as it's only used to compare your file before and after the two "main steps" of this method.
nut.py -i "YOUR_GAME [TITLEKEY][vX].nsp"
In my case, on Windows 10, I had to use the following command to access nut.py using python. So, if you have problems getting nut.py to run, try this for each and every command in this guide :
cd C:\PYTHON3_INSTALL_FOLDER
python "C:\WHERE_YOU_EXTRACTED\nut-master\nut.py" -i "YOUR_GAME [TITLEKEY][vX].nsp"

In the info dump provided by nut, you can see a ticket file (in which the rightsId is not related to your console-id), a few NCA files, a CERT file and a XML file.
If you install the NSP as is, this ticket gets imported in your console's ticket blob and when it sends its telemetry to Big-N, you get banned!!
The "main NCA file" (the one with the largest file size, AKA "the game") also has a rightsId which doesn't match your console, which could also lead to a ban if you launch the game and then connect to the internet.
You can see that the smaller NCA files have their rightsID set to 0, as they are "unprotected" because they are not important enough to protect.

- Run the following command to set the value of these rightsId to 0.
nut.py --remove-title-rights "YOUR_GAME [TITLEKEY][vX].nsp"

- (OPTIONAL) Then, if you run the "info" command again, you should see that the ticket is still there, but the instances where you had fake rightsId are set to 0 (as they are in the other NCA files, so it should theoretically be considered "unprotected" by the console).

- Now we need to remove this evil ticket to prevent it from being imported in our precious ticket blob. Let's start by unpacking the NSP.
nut.py -x "YOUR_GAME [TITLEKEY][vX].nsp"

A folder is then created with all the files of the NSP inside.

- DELETE (OR MOVE AWAY) THE NSP FROM YOUR nut-master FOLDER!!

- Navigate to that folder, and delete the ticket file "WHATEVER.TIK".

- Then, we repack the NSP without this ticket :
nut.py -c "YOUR_GAME [TITLEKEY][vX].nsp" "C:\WHERE_YOU_EXTRACTED\nut-master\YOUR_GAME [TITLEKEY][vX]\*.*"

For some reason, in my case, this command didn't work. It seems that, in some instances on Windows, Python3 shits the bed when using wildcards. But for Blawar, also on Windows 10, it works perfectly. Go figure.

If this happens to you, use the following command instead (it's incredibly long and tedious to input, but I didn't find another way to make it work) :
nut.py -c "YOUR_GAME [TITLEKEY][vX].nsp" "C:\WHERE_YOU_EXTRACTED\nut-master\YOUR_GAME [TITLEKEY][vX]\FILE1.cert" "C:\WHERE_YOU_EXTRACTED\nut-master\YOUR_GAME [TITLEKEY][vX]\FILE2.nca" "C:\WHERE_YOU_EXTRACTED\nut-master\YOUR_GAME [TITLEKEY][vX]\FILE3.nca" ............. "C:\WHERE_YOU_EXTRACTED\nut-master\YOUR_GAME [TITLEKEY][vX]\LAST_FILE.xml"

YOU MUST DO THIS WITH EVERY FILE (apart from the deleted ticket) IN THE FOLDER IN A SINGLE COMMAND!

- There you go, it's done. You can run the "info" command again and you should see that the ticket (along with the rightsID) is no more.
The final file size should be about 768 bytes smaller than the initial file size.



This has been tested with SXOS and it works flawlessly. The games install and run just fine.
You also need to follow the same procedure for the NSP updates you want to install.

Thanks again Blawar for your incredible tool and all the help you gave me!!
 
Last edited by PsychOsmosis,

Bigjokker

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
98
Trophies
0
Age
47
XP
356
Country
United States
Also you can change SET "nutpy=D:\Documents\Switch\nut-master" to SET "nutpy=%~dp0"

Then you won't have to enter the folder path.

You can also delete the .cert file which is installed with the .tik

del *.cert
 
Last edited by Bigjokker,
  • Like
Reactions: huma_dawii

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
Also you can change SET "nutpy=D:\Documents\Switch\nut-master" to SET "nutpy=%~dp0"

Then you won't have to enter the folder path.

Alright!!

You can also delete the .cert file which is installed with the .tik

del *.cert

Yeah? I wasn't sure about that one. I'll try it out with my next .NSP and if it all works flawlessly, I'll add it to the guide!
 

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,880
Trophies
2
Age
33
Location
Planet Earth
XP
4,270
Country
United States
Also you can change SET "nutpy=D:\Documents\Switch\nut-master" to SET "nutpy=%~dp0"

Then you won't have to enter the folder path.

You can also delete the .cert file which is installed with the .tik

del *.cert


Alright!!


Yeah? I wasn't sure about that one. I'll try it out with my next .NSP and if it all works flawlessly, I'll add it to the guide!

Outstanding job!
 

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
You can also delete the .cert file which is installed with the .tik

del *.cert

I've been doing a bit of reading on the .cert file (since I chose FFXV to test it out and it takes FOREVER to FTP to my console) and there seems to be no information out there about what the file does or how it's processed by the console (if at all).
NSP/eShop titles use the ticket for validation, so I've got no idea what the .cert does...

Moreover, I compared the certificate of all my eShop titles (scene releases, all from the same place, but still) byte by byte using software and the .cert file is IDENTICAL for ALL the NSP titles...
So yeah, it seems you're right about it being useless. I just hope it's not a "presence required" file, like some sort of seal of approval identical between all games (that would be really shitty security though).

My guess is that it's generated by CDNSP and everybody out there use the same software to pull the titles from the CDN and that's why it's identical. It might not even come from the game itself...
It would be nice to have a definitive explanation though, but oh well!

EDIT: It would be really nice if someone had a legit eShop title extracted from their console (is that even possible) so we could compare if it has a .cert file and if it's identical. If so, it's a good idea to keep it, but my hunch says it won't be there, or at least it will be different.

EDIT2: Oh!! Directly from the CDNSP dev:
for private content the CERT (non console nor game-unique) will be copied and renamed appropriately

So it's a bad idea to get rid of the file, since it's non console nor game-unique. It's indeed some sort of "presence required" Big-N seal of approval!!
 
Last edited by PsychOsmosis,

suzsuzuki

Well-Known Member
Member
Joined
Aug 25, 2016
Messages
403
Trophies
0
Age
36
XP
471
Country
Brazil
I followed your guide on Monday, playing online everyday with non-legit games like splatoon 2 and I'm not banned yet. Let's wait...
I also blocked telemetry.
 
  • Like
Reactions: andeers

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
I followed your guide on Monday, playing online everyday with non-legit games like splatoon 2 and I'm not banned yet. Let's wait...
I also blocked telemetry.

Wow, that's one way to try it out. I don't think it would prevent the Big-N servers from detecting you if you actually play online with the games but if it does, that's huge!!
Thanks for trying it out I guess!
 
Last edited by PsychOsmosis,
  • Like
Reactions: andeers

Torem

Active Member
Newcomer
Joined
Nov 16, 2016
Messages
31
Trophies
0
Age
33
XP
218
Country
Managed to get ths working for myself, except sometimes when I run an update through it, it just deletes the update nsp, any idea what im doing wrong?

Edit: Couple files made with this dont work on 6.0
 
Last edited by Torem,

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
Managed to get ths working for myself, except sometimes when I run an update through it, it just deletes the update nsp, any idea what im doing wrong?

Edit: Couple files made with this dont work on 6.0

Yeah, so it might not be working at all in your case.

Remove the @ echo off at the beginning and add pause in a new line after the last line of code in the batch file, then run it twice : once with a file that you think worked and once with an update that failed.
This should leave the command line window open so you can see what errors are displayed!

If the window doesn't stay on screen even after doing the two modifications, report back here with that information. I know what the next step should be if this happens.

I modified the batch and added a troubleshooting method in the OP that you should follow (removing "REM " in front of "pause" three times) so then you can see exactly what goes on (and goes wrong) at each of the three steps!
Do this and report back to me if you want me to help you fix it.

Everytime you make an attempt, delete the NSP and the folder with the same name as your NSP (if it was created) and put back a new copy of the original NSP (as we don't know if it has modified it in your attempt)!
 
Last edited by PsychOsmosis,

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
What size is the game you start with and the size of the converted one?

I don't verify it but Im sure the ticket was deleted (verify by extract the "patched" nsp and no tik in, verify it with tinfoil too)
It is around 50mo

You need to verify the size in bytes because the size difference is actually 768 bytes.
I'm not sure about atmosphere as I'm on SXOS but there should be no difference with the original NSP, so if the original worked, the modified NSP should work.

If you use the updated batch script in the OP and remove the three "REM " in front of the three "pause", you can see the script run step by step. You will know if it worked correctly then.
If the script worked correctly, then it is a problem with atmosphere. If that's the case, it would be nice to know if the unmodified NSP works because then we could look for a way to make the CFW compatible (disabling sigpatch check? dunno if that's related or not).
 

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
I don't verify it but Im sure the ticket was deleted (verify by extract the "patched" nsp and no tik in, verify it with tinfoil too)
It is around 50mo
Also, there are two modifications applied by nut. Deleting the ticket is only one of them. The first one is removing the title rights so the header doesn't try to use the ticket anymore. If the first part didn't work AND the ticket was deleted, your NSP would indeed not work!!
So you should really do the troubleshooting I listed in the OP (removing "REM " in front of the "pause" at the three locations) and tell me what is displayed by nut at the FIRST pause.
 
Last edited by PsychOsmosis,

jaybbb

New Member
Newbie
Joined
Sep 21, 2018
Messages
1
Trophies
0
Age
38
XP
100
Country
France
If I already installed some of these NSP is there a way to remove the fake tickets from the console? I did not do a NAND Backup (I know I'm stupid).
Thanks
 

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
If I already installed some of these NSP is there a way to remove the fake tickets from the console? I did not do a NAND Backup (I know I'm stupid).
Thanks

Hmm, without doing a NAND restore I don't know if it's possible to remove a ticket from your ticket blob.
Maybe by uninstalling the game (Deleting without ability to redownload in the settings), there's a chance the ticket gets purged from the blob (that would make some kind of sense, as you don't have the game anymore on your console).
I would do that if I were you.

Hactool allows to dump your ticket blob!! Could you download hactool and follow these instructions (just the "Obtaining your Title Keys" part) before and after the deletion of the game so you can tell us if one of the tickets disappears at the same time?
Make a copy of the /save/80000000000000e1 and /save/80000000000000e2 from your SD card to your PC and work on those! Don't work directly on the SD card.
If you do so, don't post your keys here!! Just tell us if there is one less after the deletion!

Buy the game.

Buying the game won't change anything about the fake ticket in his ticket blob.
If deleting the game doesn't purge the ticket blob, he will just have a legit ticket alongside the fake ticket and be at the exact same ban risk.

The only thing you can attempt is deleting the game "permanently" in the settings.
 
Last edited by PsychOsmosis,

Torem

Active Member
Newcomer
Joined
Nov 16, 2016
Messages
31
Trophies
0
Age
33
XP
218
Country
Yeah, so it might not be working at all in your case.

Remove the @ echo off at the beginning and add pause in a new line after the last line of code in the batch file, then run it twice : once with a file that you think worked and once with an update that failed.
This should leave the command line window open so you can see what errors are displayed!

If the window doesn't stay on screen even after doing the two modifications, report back here with that information. I know what the next step should be if this happens.

I modified the batch and added a troubleshooting method in the OP that you should follow (removing "REM " in front of "pause" three times) so then you can see exactly what goes on (and goes wrong) at each of the three steps!
Do this and report back to me if you want me to help you fix it.

Everytime you make an attempt, delete the NSP and the folder with the same name as your NSP (if it was created) and put back a new copy of the original NSP (as we don't know if it has modified it in your attempt)!

So I added the pauses into the file, and discovered that the problem with the updates is that it doesn't do the third squirrel, it jumps from the second "press any key" straight to the third, without repacking the update as an nsp, ive attached a picture showing where the issue is, if that helps

Edit: Also just double tested, and it appears on firm 6.0 games installed using this method will come up as "corrupted" I'm not sure if anyone is aware of this yet or not
 

Attachments

  • Capture.PNG
    Capture.PNG
    11.9 KB · Views: 281
Last edited by Torem,
  • Like
Reactions: imedox

PsychOsmosis

Well-Known Member
OP
Newcomer
Joined
Jan 18, 2016
Messages
99
Trophies
0
XP
592
Country
Canada
So I added the pauses into the file, and discovered that the problem with the updates is that it doesn't do the third squirrel, it jumps from the second "press any key" straight to the third, without repacking the update as an nsp, ive attached a picture showing where the issue is, if that helps

Edit: Also just double tested, and it appears on firm 6.0 games installed using this method will come up as "corrupted" I'm not sure if anyone is aware of this yet or not

Ohh!! I see what the problem is. Because of the wildcard problem of Python3 in Windows 10, I had to manually write up the code for every number of files possible in an NSP. Since with the NSPs I have, it was always between 5 and 7 files, I created rules for 4 to 8 files, thinking it would be enough.
Turns out I was wrong on a first party game like Mario Kart 9 Deluxe, where the game seems split up in a largeish number of smaller files.

Looking at it now, there seems to be 13 with the ticket, so 12 to be repacked. There is probably more but I can't see what's above on your window.
I'll update the code for up to 16 files, so if it's more than that, just tell me.

I'll look into the 6.0 issue when I have a bit more time.
 
  • Like
Reactions: Torem

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: you can fap to your favorite character without it being gay