Hacking Wii U - Python One Liners Thread

Onion_Knight

Well-Known Member
OP
Member
Joined
Feb 6, 2014
Messages
878
Trophies
0
Age
45
XP
997
Country
I use these all the time, and i've posted them in various threads but I thought I'd just consolidate them and offer a place for others to toss their most useful one liners. All of mine are in Python and handle some of the more onerous tasks that I come across. Anyone can use these, you do not need to know how to program in the slightest. They must all be run in the directory where the files are located unless you want to specify their filepaths.

Copying and Pasting Title Keys in to proper binary format can be tedious and you have to have a hex editor. Here's a python one-liner that makes it happen automagically:

Make a disckey.bin for vgmtool or ckey for DiscU
Code:
python -c "import binascii; open('disckey.bin', 'wb').write(binascii.unhexlify('<insertyourkeyhere>'))"
in between the delete everything from the < to the > and just copy/paste your key in!

You downloaded a title from NUS and need a title.tik, but you only have the title key. This pads out the the file and inserts the key in the correct location for CDecrypt to read it.
Code:
python -c "import binascii; open('title.tik', 'wb').write(b'\0'*0x1bf + binascii.unhexlify('<insertyourkeyhere>'))"
in between the delete everything from the < to the > and just copy/paste your key in!


You downloaded a title from NUS but you need to remove the ".app" file extension from your files to properly decrypt
Code:
python -c "import os; [os.rename(file,file.split('.')[0]) for file in os.listdir('.') if '.app' in file]"

You want to self host the html files but you don't want to try to set up a webserver, this works with the Dimok loadiine's elf loader.

This depends on what Python version you've installed:
Python 2:
Code:
python -m SimpleHTTPServer [optional port]
the [optional port] is really actually optional if you put nothing there after the SimpleHTTPServer, it defaults to 8000
so the URL you browse to is: http://<yourip>:8000

Python 3:
Code:
python -m http.server [optional port]
Once again the optional is really optional.


I'll update this whenever I find myself writing a one liner consitently for something else. I use these all the time and I constantly see people asking how to do these things on a daily basis.
 
Last edited by Onion_Knight,

AntonioMontana

New Member
Newbie
Joined
Jun 20, 2007
Messages
2
Trophies
0
XP
187
Country
Gambia, The
Thanks for the tut

but new here
Need more help to create a title.tik

i copy paste in python -c "import binascii; open('title.tik', 'wb').write(b'\0'*0x1bf + binascii.unhexlify('<DCB529E0E834BC86CF84B4D575ADA08C>'))"

python say invalid Syntax

Sorry for my bad english
 

markehmus

Well-Known Member
Member
Joined
Jul 26, 2008
Messages
1,521
Trophies
0
Age
112
Location
in the GAME
XP
1,379
Country
Canada
Thanks for the tut

but new here
Need more help to create a title.tik

i copy paste in python -c "import binascii; open('title.tik', 'wb').write(b'\0'*0x1bf + binascii.unhexlify('<DCB529E0E834BC86CF84B4D575ADA08C>'))"

python say invalid Syntax

Sorry for my bad english

delete < to the > , including the <> then try maybe
<> gives error is all ...
TypeError: Non-hexadecimal digit found

edit or i am wrong & maybe python isnt installed right or path is not set in Enviromental variable
 
Last edited by markehmus,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    Im back
  • RedColoredStars @ RedColoredStars:
    But that topic makes me sad. :(
  • RedColoredStars @ RedColoredStars:
    Abusive narcissistic ex shame guilted me into selling them becasue my gaming and interests were childish like a little kid collecting toys. :(
    +1
  • RedColoredStars @ RedColoredStars:
    I had soooooooooooo many of them. All still sealed.
    +1
  • RedColoredStars @ RedColoredStars:
    I eventually had to contact a domestic abuse advocate to help me get out of the apartment I was in a lease with her. And filed a restraining order on her cuz she kept harassing me after i left her.
    +1
  • Xdqwerty @ Xdqwerty:
    I didnt bring my Charger and nobody here has one compatible with my phone
  • RedColoredStars @ RedColoredStars:
    either you have usb C and no one else does, or everone else has usb c except you. haha
    +1
  • Xdqwerty @ Xdqwerty:
    @RedColoredStars, i don't have usb c
  • RedColoredStars @ RedColoredStars:
    That happened to me for like a year. lol. I was the only one of all my friends and family to still have an old phone.
  • Xdqwerty @ Xdqwerty:
    @RedColoredStars, my phone is from around 2019
  • RedColoredStars @ RedColoredStars:
    Mine was from 2017. lolol. I just got this new one like 6 months ago. Not even new, second hand cheapo $40 phone. But it has usb c. lol
  • RedColoredStars @ RedColoredStars:
    I cant justify $1k+ on a nice ass phone. I can spend that on a 75" tv screen. Why a 6" screen device cost me the same? lol
    +2
  • BigOnYa @ BigOnYa:
    I had a iPhone 5 for like 6 years, till last year, and had to get new phone, when phone companies stop using the cdna networks, which the iphone5 used.
  • K3Nv2 @ K3Nv2:
    A phone can do more than a TV
    +2
  • BigOnYa @ BigOnYa:
    These smart TVs are getting close tho. Gonna be like "back to future" TVs before long.
    +1
  • K3Nv2 @ K3Nv2:
    Nah a phones going to always be more powerful than a TV if the TVs $2grand maybe but why when I can put a smaller device in my pocket that does basically everything a TV already does
    +1
  • K3Nv2 @ K3Nv2:
    I can justify a decent $800 smartphone that'll last 3 years when I could get a 65" TV for $400 and buy a decent micro computer for $100 more
  • K3Nv2 @ K3Nv2:
    Tbf there are decent $400 smartphones in today's market that make top end spec phones unjust it's just what you want
  • Xdqwerty @ Xdqwerty:
    Found a Charger that works with my phone
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah Ken I have 3 Samsung Phones now and honestly all 3 feel about the same
  • Psionic Roshambo @ Psionic Roshambo:
    A35 a S23 FE S24 Ultra lol
  • Psionic Roshambo @ Psionic Roshambo:
    Camera is about the only thing that legit separates them, unless you play games on your phone....
  • K3Nv2 @ K3Nv2:
    I honestly just download movies on my phone put them on my card reader then on my tv so much better than wireless transfer bs
  • K3Nv2 @ K3Nv2:
    Glad I bought a card reader type c and usb A makes life easy
    K3Nv2 @ K3Nv2: Glad I bought a card reader type c and usb A makes life easy