Comments (3)
In lines 19 + 21
subprocess.run(f'hactoolnet --keyset prod.keys -t switchfs {firmware} --title 0100000000000819 --romfsdir 0100000000000819/romfs/', stdout = subprocess.DEVNULL) and subprocess.run(f'hactoolnet --keyset prod.keys -t pk11 0100000000000819/romfs/nx/package1 --outdir 0100000000000819/romfs/nx/pkg1', stdout = subprocess.DEVNULL)
This could be adjusted to:
subprocess.run(f'hactoolnet --keyset ' + prod_keys + ' -t switchfs {firmware} --title 0100000000000819 --romfsdir 0100000000000819/romfs/', stdout = subprocess.DEVNULL) and subprocess.run(f'hactoolnet --keyset ' + prod_keys + ' -t pk11 0100000000000819/romfs/a/package1 --outdir 0100000000000819/romfs/nx/pkg1', stdout = subprocess.DEVNULL)
Reason, well you already define the path to check in this line: prod_keys = os.path.expanduser('~/.switch/prod.keys') When the subprocess runs it now looks where you put the prod_keys check in the first place.
Thanks.
I instead added argument -k or --keys to provide a keyfile, but still default to ~/.switch/prod.keys if the user does not provide an input.
from switch-ghidra-guides.
well did more than what you asked for, also with python, doing a "formatted string" ( f'thing {other_thing} thing'), you can encapsule variables with squiggly brackets to run them as code instead of doing 'thing ' + other_thing + ' thing`
subprocess.run(f'hactoolnet -t switchfs {location} --title 0100000000000819 --romfsdir {location}/titleid/0100000000000819/romfs/', stdout = subprocess.DEVNULL)
from switch-ghidra-guides.
Yep, thanks - I also made a typo in the above. But you fixed it :-)
from switch-ghidra-guides.
Related Issues (9)
- uncompressed_nifm.nso0 is not output HOT 1
- Setup guide - wrong java JDK version linked. HOT 4
- Some Typo's in your keygen scripts. HOT 9
- Mod - Mariko_keygen.py - don't overwrite custom keys HOT 21
- Mod clean up used files. HOT 1
- Dev keygen - key_hash HOT 3
- hactoolnet question HOT 1
- Loader patch question HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from switch-ghidra-guides.