Release: GenTickets

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by AnalogMan, Apr 21, 2016.

?

Would you like TitleID to be included in the file name?

  1. Yes

    87.0%
  2. No

    13.0%
  1. AnalogMan
    OP

    AnalogMan sumoCheatMenu Dev

    Member
    1,328
    772
    Apr 20, 2007
    United States
    You may have already seen the debut of GenTickets in the FunKeyCIA thread here. However I'm making a thread for it to keep track of updates, requests, and visibility.

    Release: GenTickets v2.1.2
    A script to download ticket files given a TitleID and Encrypted TitleKey OR using your encTitleKeys.bin file and name them by Title Name, region, and TitleID with region filtering. Saves detailed results to a CSV file for importing into Excel or Google Documents (does not work well importing into Numbers). Each run adds to the CSV file if it exists.

    Install these tickets with FBI v2 and then download the titles from the eShop.

    Requires:
    • Python3, PyCrypto
    • ctr-common-1.crt and ctr-common-1.key (Found on PlaiCDN github)
    • encTitleKeys.bin for BIN processing
    • decTitleKeys.bin for validation (can be skipped)

    Usage:
    Code:
    python3 gentickets.py <REG> <[TitleID EncryptedTitleKey] OR [-bin] OR [-skipcheck]>
    REG is the region you'd like to filter. Ex. USA, EUR, JPN, TWN, KOR, etc. Use ANY to make tickets for all regions. (Region free is always included)
    You may use a TitleID and Encrypted TitleKey pair or you may use one of the BIN options.
    If you have an encTitleKeys.bin that you know contains only valid keys, you may use the -skipcheck option instead of -bin to save time.

    Change Log

    Script attached to post.
     

    Attached Files:

    Last edited by AnalogMan, Apr 25, 2016


  2. Xenon Hacks

    Xenon Hacks GBAtemp Guru

    Member
    7,043
    3,349
    Nov 13, 2014
    United States
    This is technically faster than using FunKeyCIA now we wait for FunKeyCIA to turn into its own eShop app with a full eShop like GUI
     
    Hoppy likes this.
  3. Angelcraft

    Angelcraft GBAtemp Advanced Fan

    Member
    520
    53
    Sep 8, 2015
    Spain
    Help? it says: File ~~ , line 21n in <module> import urllib.request, urllib.error, urllib.parse
    ImportError: No module named request
     
    Last edited by Angelcraft, Apr 21, 2016
    Xenon Hacks likes this.
  4. Xenon Hacks

    Xenon Hacks GBAtemp Guru

    Member
    7,043
    3,349
    Nov 13, 2014
    United States
    lol you censor your name but not the key :rofl:
     
  5. Angelcraft

    Angelcraft GBAtemp Advanced Fan

    Member
    520
    53
    Sep 8, 2015
    Spain
    what xD?

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

    help pls xD
     
  6. AnalogMan
    OP

    AnalogMan sumoCheatMenu Dev

    Member
    1,328
    772
    Apr 20, 2007
    United States
    Are you running it with python 3 and not Python 2?
     
  7. Angelcraft

    Angelcraft GBAtemp Advanced Fan

    Member
    520
    53
    Sep 8, 2015
    Spain
    i think yess
     
  8. AnalogMan
    OP

    AnalogMan sumoCheatMenu Dev

    Member
    1,328
    772
    Apr 20, 2007
    United States
    I just tested it and that's the error you get running it with Python 2. Make sure you're actually typing "python3 gentickets.py" to use Python 3
     
  9. Hking0036

    Hking0036 GBAtemp Fan

    Member
    397
    194
    Sep 15, 2015
    United States
    I have python 2 and 3.5 installed, working fine. I'll be interested to see this work out.

    I have to ask though, why can't Nintendo ban people off their ticket.db?
    It seems like a new public headers issue like for .3ds files, with a bunch of ticket.dbs having the same title keys.
     
  10. AnalogMan
    OP

    AnalogMan sumoCheatMenu Dev

    Member
    1,328
    772
    Apr 20, 2007
    United States
    Each unique title use the same TitleKey, that is how Nintendo made their eShop. If you purchased a title on two 3DS's they'd have the same TitleKey.

    However they could easily ban us for having fake TitleID's from our Homebrew since day one of the 3DS's being able to install CIA homebrew but they haven't.
     
    Hking0036 likes this.
  11. KillzXGaming

    KillzXGaming GBAtemp Advanced Maniac

    Member
    1,553
    651
    Jan 2, 2016
    United States
    I had to use python instead of python3 even though i have python version 3.
     
  12. AnalogMan
    OP

    AnalogMan sumoCheatMenu Dev

    Member
    1,328
    772
    Apr 20, 2007
    United States
    Weird, I'm on Mac OS X so I specify python3. Or you can give it execute permission with chmod +x gentickets.py and then just run it with ./gentickets.py and it will pick automatically.
     
  13. Dev5359

    Dev5359 Advanced Member

    Newcomer
    65
    24
    Apr 3, 2016
    United States
    Stumped on how to install PyCrypto on Python 3.5 32 bit. Can't find any binaries.
     
  14. Hking0036

    Hking0036 GBAtemp Fan

    Member
    397
    194
    Sep 15, 2015
    United States
    Crashed: [​IMG]

    You can google up binaries for python up to 3.3, but I managed to find a build for 3.5 here: https://github.com/sfbahr/PyCrypto-Wheels
     
    Last edited by Hking0036, Apr 21, 2016
  15. Dev5359

    Dev5359 Advanced Member

    Newcomer
    65
    24
    Apr 3, 2016
    United States
  16. AnalogMan
    OP

    AnalogMan sumoCheatMenu Dev

    Member
    1,328
    772
    Apr 20, 2007
    United States
    New version uploaded, should fix your issue.
     
    Hking0036 likes this.
  17. Hking0036

    Hking0036 GBAtemp Fan

    Member
    397
    194
    Sep 15, 2015
    United States
    sure thing, giving it another go now, will edit if I run into any problems.
     
  18. AnalogMan
    OP

    AnalogMan sumoCheatMenu Dev

    Member
    1,328
    772
    Apr 20, 2007
    United States
    Updated it to keep the special characters like quotes. If you don't mind the lack of quotes then no need to update with this version.
     
    Last edited by AnalogMan, Apr 22, 2016
  19. uherrera

    uherrera Member

    Newcomer
    20
    4
    Nov 19, 2008
    United States
    The download process is relatively slow when processing the entire encTitleKeys from that one key site.

    Is it possible to add a feature to only download new tickets when running it a second time?
     
  20. cearp

    cearp the ticket master

    Member
    7,405
    4,658
    May 26, 2008
    Tuvalu
    FunKeyCIA does what this does, apart from sorting the tickets (and checking the keys)
    i wouldn't say it is faster or slower, maybe FunKeyCIA is simpler because you can give -nfskeyfile and it will fetch the encrypted key file for you from online... :)