COMPLETED CDNSP - Download & repack your games, updates, and DLC's to NSP!

Discussion in 'Switch - Backup Loaders & Modchips' started by rkk, Jul 3, 2018.

  1. rkk
    OP

    rkk Member

    Newcomer
    3
    Jun 16, 2018
    France
    [EDIT]
    • I have changed the way my script generates tiks and certs. It seems more games will install, but some reportedly won't launch. Attached files have been updated.
    • It seems Nintendo is monitoring the situation. See later in the thread for more details

    NOTE: Using this script to download unowned content (and most probably owned too) will lead to a ban. Don't hold me responsible for decisions YOU decided to take.

    CDNSP is a Python3 CDN downloader. It needs the requests library (pip install request). tqdm (pip install tqdm) is optional and will make your progress bars look better. Maybe some more, I'm not sure.

    What it can do:
    • Print useful info about a titleid (name, available updates)
    • Download games, updates, DLC's and even system update, in their entirety (that means all the available content, logo, legal info, ...) is downloaded
    • Batch download everything explicited further up
    • Resume downloads right were you left them at
    • Repack games, DLC's, updates as ready-for-install NSP's
    What it does:
    • Download and extract the CNMT (content metadata) NCA, and parse it to find the other content to download
    • If you want to repack your download as NSP, it will generate a CNMT.XML file
    • Generate the TIK and CERT:
    • for private content the CERT (non console nor game-unique) will be copied and renamed appropriately. The TIK will be generated using a blanked out file taken from BBB's Yooka-Laylee dump, and plug in the titlekey and titleid. To generate the TIK for private content, the titlekey is REQUIRED
    • for public content, it will directly download the CETK from Nintendo's servers, and extract the TIK and CERT.
    • Download everything else
    • And finally, repack everything to an NSP

    To get started, you need:
    • hactool, and its keys
    • A console-unique certificate, in PEM format (I have included a PFX to PEM converter script, simply drag your PFX over it)
    • The ShopN certificate, in PEM format (this one is included in the zip)
    • Edit your config in the CDNSPconfig.json
    Use the command prompt to download your titles. Example are provided below, and a help message is included

    Examples:
    Print info
    Download games/updates/DLC's
    Download system updates
    Config
    Usage

    Cheers! To get you started, I have also included a small list of 859 TitleID's.
     
    Last edited by rkk, Jul 4, 2018
    poedgirl, Babu1014, dehugin and 60 others like this.
  2. Draxzelex

    Draxzelex GBAtemp Psycho!

    Member
    11
    Aug 6, 2017
    United States
    New York City
    Should have been called BanShop
     
    JellyPerson, Loko4, lordelan and 36 others like this.
  3. XerSec

    XerSec Member

    Newcomer
    1
    Jun 13, 2018
    United States
    Damn, nice job @rkk. Really good progress
     
    cearp likes this.
  4. kornychaos

    kornychaos Organized.

    Member
    4
    Jul 7, 2007
    United States
    Last edited by kornychaos, Jul 3, 2018
    wolf_ likes this.
  5. cearp

    cearp 瓜老外

    Member
    16
    May 26, 2008
    Tuvalu
    even game updates require a console unique cert?
    because game update are not console unique, the ticket is generic (like wiiu, unlike 3ds)
    anyway, this is really cool! very happy thanks :)
     
  6. rkk
    OP

    rkk Member

    Newcomer
    3
    Jun 16, 2018
    France
    Heh, that's how the CDN works, not my doing.

    Yeah, that was 01006a600623e000: 70010000001564 - Yodanji. Not sure why it slipped through my script.

    — Posts automatically merged - Please don't double post! —

    Like I said in the OP, TIK and CERT are directly downloaded from Nintendo in the case of updates.
    Downloading anything REQUIRES a console-unique cert. Updates, Sysupdates, ...
     
    theweirdojerry, straumli and cearp like this.
  7. Jaimy

    Jaimy GBAtemp Regular

    Member
    2
    Dec 2, 2016
    United States
    I get module not found error for 'requests' and 'urllib3' despite having installed required packages.
     
  8. rkk
    OP

    rkk Member

    Newcomer
    3
    Jun 16, 2018
    France
    Are you using python 3?
     
  9. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    This but to .Nca thanks :)
     
  10. rkk
    OP

    rkk Member

    Newcomer
    3
    Jun 16, 2018
    France
    Files are already downloaded as NCA (that's what the CDN returns). The script will let them sit in your folder.
     
    theweirdojerry likes this.
  11. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    So I can download an update and all I will get is one .nca? Cause I need that to merge them with the stockgame.nca and get an updated romfs.bin for LAYEREDFS
     
  12. rkk
    OP

    rkk Member

    Newcomer
    3
    Jun 16, 2018
    France
    Merging NCA's is technically impossible. Downloading an update will get you several NCA's.
     
    theweirdojerry likes this.
  13. huma_dawii

    huma_dawii GBAtemp Addict

    Member
    7
    Apr 3, 2014
    United States
    Planet Earth
    But you can extract them and get a single romfs.bin it's been confirmed by a lot of people xD
     
  14. Mat37

    Mat37 GBAtemp Advanced Fan

    Member
    3
    Dec 3, 2016
    France
    France i think
    I get "no module named openSSL" when trying to convert my certificate. How do i install it ?
     
  15. Jaimy

    Jaimy GBAtemp Regular

    Member
    2
    Dec 2, 2016
    United States
    Think I'm on 2.7, will try with 3.
     
    ut0pia likes this.
  16. rkk
    OP

    rkk Member

    Newcomer
    3
    Jun 16, 2018
    France
    Extracting != Repacking. NCA's are signed using a private key(s?) we don't have access to.

    pip install pyOpenSSL
     
    theweirdojerry likes this.
  17. Mat37

    Mat37 GBAtemp Advanced Fan

    Member
    3
    Dec 3, 2016
    France
    France i think
    I was missing the py before OpenSSL thank you
     
    rkk likes this.
  18. Omno

    Omno Member

    Newcomer
    2
    Mar 2, 2016
    Working great here, thanks very much.
     
    rkk likes this.
  19. rkk
    OP

    rkk Member

    Newcomer
    3
    Jun 16, 2018
    France
    Cool, good to know.
    While we're at it, it's technically possible to add 'support' for pfx certs by converting them in a tempfile everytime the script is launched. I didn't add it because it would bloat you AppData/Local/Temp folder.
    I'm also looking at listing available DLC's when printing info about a file.
     
    theweirdojerry likes this.
  20. Xenon Hacks

    Xenon Hacks GBAtemp Guru

    Member
    13
    Nov 13, 2014
    United States
    This is needed now more than ever due to SX 1.3, glad I have a solid VPN.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice