Homebrew Could Someone Make This Script..?

mondul

Well-Known Member
Member
Joined
Aug 8, 2018
Messages
126
Trophies
0
Age
40
Location
Barranquilla
XP
897
Country
Colombia
Here you have a short python3 (3.5 onwards) script for finding the eMMC CID and the console ID:
Code:
#!/usr/local/bin/python3

import sys
from os import path

# Initialize NAND filename, path and the default exit code
nand_file = 'nand.bin'
nand_path = ''
exit_code = 0

# Try to get the NAND file from the command line
if len(sys.argv) > 1:
    nand_path, nand_file = path.split(sys.argv[1])

# Read the NAND file
try:
    with open(path.join(nand_path, nand_file), 'rb') as f:
        # Go to the No$GBA footer offset
        f.seek(0xF000000)
        # Read the footer's header :-)
        bstr = f.read(0x10)

        if bstr == b'DSi eMMC CID/CPU':
            # Read the CID
            bstr = f.read(0x10)
            cid =  bytearray(bstr).hex().upper()
            print('eMMC CID  : ' + cid)
            # Save it to a text file at the same NAND location
            with open(path.join(nand_path, 'CID.txt'), 'w') as ftxt:
                ftxt.write(cid)

            # Read the console ID
            bstr = f.read(8)
            console_id = bytearray(reversed(bstr)).hex().upper()
            print('Console ID: ' + console_id)
            # Save it to a text file at the same NAND location
            with open(path.join(nand_path, 'ConsoleID.txt'), 'w') as ftxt:
                ftxt.write(console_id)

        else:
            print('ERROR: No$GBA footer not found')
            exit_code = 1

except FileNotFoundError:
    print('ERROR: Could not open the file ' + nand_file)
    exit_code = 1

sys.exit(exit_code)

EDiT: Updated code
 
Last edited by mondul,
  • Like
Reactions: Sha8q

mondul

Well-Known Member
Member
Joined
Aug 8, 2018
Messages
126
Trophies
0
Age
40
Location
Barranquilla
XP
897
Country
Colombia
could you somehow make it save the consoleid and CID directly to a file?
Updated the script with the following features:
  • The NAND file can now be specified from the command line. If not, nand.bin will be used.
  • It will save CID.txt and ConsoleID.txt at the same location as the NAND file.
  • Added an exit code in case of errors.
  • Added comments.
 
  • Like
Reactions: Sha8q

mondul

Well-Known Member
Member
Joined
Aug 8, 2018
Messages
126
Trophies
0
Age
40
Location
Barranquilla
XP
897
Country
Colombia
Anyone able to make a script that can remove the NO$ fooster from a NAND image? Also is there one that can download the 00000002.app launcher from the CDN and decrypt it?
First one already coded and working, tested withNo$GBA, but on Mac it is not removing the read-only flag, that's why I haven't included it yet in my helper script.

I'm working on the second one on my free time, will let you know when it's done EDiT: @Sha8q Here it is: https://gist.github.com/mondul/a4705c32de1687a7756173596372345c
 
Last edited by mondul,
  • Like
Reactions: Sha8q

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • Xdqwerty
    what are you looking at?
  • AncientBoi @ AncientBoi:
    Both of mine are i5's lol
  • AncientBoi @ AncientBoi:
    All right! Who stole my right sock? :angry:
  • RedColoredStars @ RedColoredStars:
    At least someone other than myself thought it was funny :rofl:
    +2
  • BakerMan @ BakerMan:
    DNDBD (DND×DBD) IS A REAL THING
  • Xdqwerty @ Xdqwerty:
    I didnt have school today
  • Xdqwerty @ Xdqwerty:
    Cuz it's some kind of holiday related to the town I live in
  • Xdqwerty @ Xdqwerty:
    Am I [R WORD]?
  • SylverReZ @ SylverReZ:
    @Xdqwerty, People who create revival services for the Wii end up in disaster, same goes for Pretendo lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, atleast wiimmfii went fine although people only use it for Mario kart Wii
  • SylverReZ @ SylverReZ:
    At least if they ban you for cheating, get another Wii. They're cheap as chips.
    +1
  • SylverReZ @ SylverReZ:
    Remember when RiiShop was a thing?
  • BakerMan @ BakerMan:
    not really
  • SylverReZ @ SylverReZ:
    It got shutdown because somebody "accidentally" leaked the database for the amount of people using the beta.
  • SylverReZ @ SylverReZ:
    RiiShop is the laziest way of downloading Wii games. Did somebody not think of this through?
  • BakerMan @ BakerMan:
    although i ended up accidentally changing my nand with no way of going back bc i didn't know you needed a gamecube controller to restore it (i have a wii minus/1.1, which doesn't have gamecube controller support)
  • SylverReZ @ SylverReZ:
    @BakerMan, I think you're talking about the recovery mode that the SaveMii used, and also was to restore softbricked systems.
  • SylverReZ @ SylverReZ:
    If your NAND was hardbricked, then just buy another Wii. Or go with the dirty NAND flasher method.
  • BakerMan @ BakerMan:
    and if i find the sd card i have my NAND backed up on, i can not only restore the NAND if i solder the right part in, but i can also put my NAND on dolphin, then i can play dolphin online, like PMEX Remix or MKWii Riibalanced
  • Xdqwerty @ Xdqwerty:
    Brb
  • SylverReZ @ SylverReZ:
    @BakerMan, Oh yeah, that was a thing too. Dolphin does support Wiimmfi.
  • BakerMan @ BakerMan:
    yeah you just need to put your NAND backup with wiimmfi on it
  • BakerMan @ BakerMan:
    ngl i feel like if a bunch of my friends have wiis and know how to get wiimmfi and back up their NAND, then we could do a PMEX Remix tournament
  • BakerMan @ BakerMan:
    maybe even add UMVC3/DBFZ and make it a biathlon/triathlon
    BakerMan @ BakerMan: maybe even add UMVC3/DBFZ and make it a biathlon/triathlon