Homebrew Could Someone Make This Script..?

mondul

Well-Known Member
Member
Joined
Aug 8, 2018
Messages
126
Trophies
0
Age
40
Location
Barranquilla
XP
874
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
874
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
874
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
  • BigOnYa @ BigOnYa:
    Yea that's what I'm sitting on now- 4.9, and it seems fine, have had no issues at all
  • S @ salazarcosplay:
    I don't know if people play online or such
  • K3Nv2 @ K3Nv2:
    My ps3 short circuited during a deep clean still salty about it after downloading 2tbs worth but SteamDeck okay with emulation still just can't run mgs4 worth shit
  • BigOnYa @ BigOnYa:
    Yea forgot bout trophies. They just silly to me. Just like the xbox achievements. Hey, to each they own tho.
  • K3Nv2 @ K3Nv2:
    It keeps players in touch with the game like a check list of things to do after they beat it
  • S @ salazarcosplay:
    @BigOnYa they ruined the gaming experience for me to be honest
  • S @ salazarcosplay:
    @BigOnYa Im not crazy about getting all of them, i feel like I have something to show for for the time put in
  • S @ salazarcosplay:
    @BigOnYa If you want to do rgh or 360 mod
  • S @ salazarcosplay:
    does it matter if you update your 360 or not before trying is it advisable or not
  • BigOnYa @ BigOnYa:
    Yea I don't pay attention to them really. Or do I try to 100% a game. I just play till story ends/ or I get the girl!
  • K3Nv2 @ K3Nv2:
    Bigonya uses his wiener to mod 360s
    +1
  • Xdqwerty @ Xdqwerty:
    Going to the water park, see ya
  • BigOnYa @ BigOnYa:
    You should update the 360 to newest dash before RGHing it yes. But not a big deal if you don't, you can install new dash/avatar updates after. It's just easier to do it auto online before, instead manual offline after.
  • BigOnYa @ BigOnYa:
    Have fun @Xdqwerty. If you see a chocolate candy bar floating in the water, don't eat it!
  • AncientBoi @ AncientBoi:
    :O:ohnoes: Y didn't U Tell ME that ALSO? @BigOnYa :ohnoes: 🤢🤮
    +1
  • BigOnYa @ BigOnYa:
    Does it taste like... chicken?
    +1
  • S @ salazarcosplay:
    @BigOnYa I wanted to ask you about your experience with seeing south park. Most of the people a bit younger like my younger brother and cousins that are a few younger than me that saw kids found south park funny because of the curse words, kids at school, that seemed like liking the show on a very basic level.

    I could not quite have a in depth discussion of the show.

    How was it for you? As an adult. What did you find the most interesting part about it. Did you relate to the parents of the kids and their situations. Was it satires, the commentary on society. The references on celebrities' and pop culture.
    +1
  • BigOnYa @ BigOnYa:
    I remember seeing the very first episode back in the day, and have watched every episode since. I used to set my VCR to record them even, shows how long ago.
  • BigOnYa @ BigOnYa:
    I just like any comedies really, and cartoons have always been a favorite of mine. Family guy, American Dad, Futurama, Cleveland Show, Simpsons - I like them all.
    +1
  • BigOnYa @ BigOnYa:
    South Park is great cause they always touch on relavent issues going on today, and make something funny out of it.
    +3
  • S @ salazarcosplay:
    @BigOnYa were you always up to date on the current events and issues of the time or were there issues that you first found out thru south park
  • BigOnYa @ BigOnYa:
    Most of the time yea I knew, I watch and read the news regularly, but sometimes the Hollywood BS stuff, like concerning actors slip by me. I don't follow most Hollywood BS (example: the Kardasians)
    +2
  • S @ salazarcosplay:
    @BigOnYa there were relevant issues before south park was made, that's why i think a south park prequel/spinoff would be great. Randy and his friends in their child hood
  • BigOnYa @ BigOnYa:
    Yea, like them running in high school together, getting into stuff, and how they got hitched and had kids. And how the town of South Park was back then compared to now. That would be cool to see.
    BigOnYa @ BigOnYa: Yea, like them running in high school together, getting into stuff, and how they got hitched and...