llakssz / funkiiu Goto Github PK
View Code? Open in Web Editor NEWDownload content for Wii U
Download content for Wii U
For example, 000500001011a400 is "Super Street Fighter Ⅱ" where that Ⅱ can't be interpreted and crashes the program.
This is especially an issue with -region
At the very least, adding an -ignore TITLE1 TITLE2 ... would allow people to manually circumvent the issue.
the key site don't exist anymore
please update
It now is wiiu.titlekeys.gq
FunKiiU 2.2 by cearp and the cerea1killer
The key(s) must be 32 hexadecimal characters long
000500001012be00 - is not ok.
being in FunKiiu.py
I'm not familiar with python but relying on the content type being 0x2003 is wrong...
According to crediar the content type is a series of bit flags so the proper way is something like this
(c_type & 0x02) > 0
That's assuming that c_type was an integer and the bitwise operators are the same between python and c#...
For Wii U updates, there is a (legit) ticket on N's cdn to get. (3DS doesn't have this)
I just added code to force any updated download to ignore the key/onlinekey/onlinetickets, and just get the ticket always straight from Big N.
-- because why not if any good reasons, tell me and I might change it back.
Hi,
I'm trying to do the following command to run the downloads in the background
nohup python ./FunKiiU.py -title XXXXX -onlinetickets &> test.log
If I run python ./FunKiiU.py -title XXXXX -onlinetickets
everything is fine, but as soon as I launch i with nohup, I'm getting the following error in my log:
$ cat test.log
nohup: ignoring input
*******
FunKiiU 2.2 by cearp and the cerea1killer
*******
Downloading/updating data from wiiu.titlekeys.com
-Downloading titlekeys.json.
-File size is None.
-File in disk is 83944.
Downloaded data OK!
Traceback (most recent call last):
File "./FunKiiU.py", line 441, in <module>
tickets_only=arguments.tickets_only)
File "./FunKiiU.py", line 402, in main
process_title_id(title_id, title_key, name, region, output_dir, retry_count, onlinetickets, patch_demo, patch_dlc, simulate, tickets_only)
File "./FunKiiU.py", line 248, in process_title_id
log('Simulate: Would start work in in: "{}"'.format(rawdir))
File "./FunKiiU.py", line 426, in log
print(output.encode(sys.stdout.encoding, errors='replace'))
TypeError: encode() argument 1 must be string, not None
is there something wrong with the script?
When trying to download this title (an update) I get the following output:
$ python FunKiiU.py -onlinetickets -title 0005000e10112200
*******
FunKiiU 2.2 by cearp and the cerea1killer
*******
Downloading/updating data from redacted
-Downloading titlekeys.json.
-File size is None.
-File in disk is 258382.
Downloaded data OK!
Starting work in: "install/0005000e10112200 _ Update"
Downloading TMD...
-Downloading install/0005000e10112200 _ Update/title.tmd.
-File size is None.
-File in disk is 0.
This is an update, so we are getting the legit ticket straight from Nintendo.
-Downloading install/0005000e10112200 _ Update/title.tik.
-File size is None.
-File in disk is 0.
Downloading Contents...
Total size is 176.31 MB
Downloading 1 of 18.
-Downloading install/0005000e10112200 _ Update/00000000.app.
-File size is 32768.
-File in disk is 0.
Download complete: 32.00 KB.15 KB of 32.00 KB, 50%
Downloading 2 of 18.
-Downloading install/0005000e10112200 _ Update/00000001.app.
-File size is 32769.
-File in disk is 0.
Content download not correct size of 32.00 KB, 50%
*Attempt 2 of 4
-Downloading install/0005000e10112200 _ Update/00000001.app.
-File size is 32769.
-File in disk is 32784.
Content download not correct size of 32.00 KB, 50%
*Attempt 3 of 4
-Downloading install/0005000e10112200 _ Update/00000001.app.
-File size is 32769.
-File in disk is 32784.
Content download not correct size of 32.00 KB, 50%
*Attempt 4 of 4
-Downloading install/0005000e10112200 _ Update/00000001.app.
-File size is 32769.
-File in disk is 32784.
Content download not correct size of 32.00 KB, 50%
ERROR: Could not download content file... Skipping title
It seems to be expecting a file of size 32769 but getting one of size 32784.
display full size for title instead of just the size for each content file
While you are downloading a file, the progress indicator appears. When it is finished, "Download complete" is printed. However, this overwrites the progress indicator, looking messy. So you see things like:
Download complete: 32.00 KB.15 KB of 32.00 KB, 50%
It would be good to do a newline before printing "Download complete".
Also (maybe should be a separate issue), it would be good if the progress indicator could get to 100%. It always ends earlier than that, usually 99%.
If the intention is that the "Download complete" line should overwrite the entirety of the progress line, that could be done instead of doing a newline first, but either way, the current output is messy.
At the moment you need to specify -onlineticket.
-onlineticket will be a legit ticket so it is the best choice to always use, without a doubt.
but if an onlineticket does not exist, instead, use the key (if that exists in the json instead)
If nothing exists, of course, give an error.
when using '-all' (now it is -region USA, -region EUR USA), default to onlinetickets, and fallback like above?
For example, should we type:
FunKiiU.py -region USA
or
FunKiiU.py -region USA -onlinetickets
and, if typing online tickets, it would only download content that has an online ticket, missing out on all stuff like dlc.
soon we will have easy signature patches, and although nice, a legit ticket will not be so important.
When using -onlinetickets, assume the user only wants the legit ticket, and if it doesn't exist, quit?
Or wait for user input, 'Do you want to get the key instead?' -- I don't want this program to be interactive...
Difficult decisions, thankfully there cannot be any upset customers ;)
The folder is created fine (0005000010131d00 _ JPN _ 幻影異聞録_FE) but for this line, it breaks:
print('-Downloading {}.\n-File size is {}.\n-File in disk is {}.'.format(outfname, expected_size,diskFilesize))
UnicodeEncodeError: 'charmap' codec can't encode characters in position 46-50: character maps to <undefined>
Unlike 3DS updates, Wii U updates have a cetk available to download, so naturally we should use that instead of making our own ticket.
I guess reuse -onlinetickets
? (yes, it seems the best option. if the title is an update, get the online ticket from nintendo, if it is not an update, get it from titlekeysite)
Happened to a user, I tried also and it happened to me too.
Title ID - 0005000010157f00
It says the file is the wrong size, not sure why.
I don't know if this is unique or if it happens with many games...
Maybe N's fault/problem, maybe mine, no idea. I will test with another cdn tool.
Actually, a quick thought, maybe the size in the TMD is incorrect (accident by N/devs?) and because @cerea1killer ensures the size of file and size in tmd must match (good idea), this causes a problem? That is the only thing I can think of.
Hi. Thanks for FunkiiU & also to the FunkiiUI team. Both work very well with python.
Been trying to get either of the above working on QPython (https://github.com/qpython-android/qpython/releases/tag/1.2.7). Tried funkiiu.py (lowercase yes) in /qpython/scripts/ and /qpython/projects/FunKiiU/ (rename to main.py), no difference.
Having more luck with just FunkiiU (no tcl/tk headaches), but I can't seem to find a working way to pass arguments in QPython. Keeps exiting with credits as on Win/Mac/Linux python without arguments.
I'm willing to hard code arguments per title, it's just that I'm unsure where what to replace / comment out.
Otherwise perhaps there's an easier fix to make them play nice? Open to suggestions.
Thanks again.
Good day. While using FunKiiU on Android to download moderately sized titles, the device's RAM was depleted, and the majority of background tasks killed. In turn, the RAM was freed when the script terminated its execution, either normally or otherwise.
By experimenting a bit, I found a memory leak in the function:
download_file(url, outfname, retry_count=3, ignore_404=False, expected_size=None, chunk_size=0x4096)
Basically, you open a socket infile
when preparing to download a file, but never close it upon completion or failure; this results in a severe memory hogging during the whole FunKiiU execution. It can be fixed by infile.close()
-ing the socket when you're done with it.
When I download updates or DLC the folders are missing name. I get "##### _ UPDATE" and "##### _ DLC" instead of "##### _ TITLE _ UPDATE" and "##### _ TITLE _ DLC"
Line 248 in 86200c6
If keysite url is case sensitive, it is saved incorrectly to config. Matters when using local copy ("file://..."
) of a keysite on casesensitive filesystems, commonly linux ext4 (is what I have).
file:///home/username/WIIU/keysite
becomes: file:///home/username/wiiu/keysite
in config.json
.
Correcting it manually in config.json
works, so the issue is with saving.
Update Data for games from NUS have a signed ticket already included, and not every game update is available on the titlekeys database (example: Mario Kart 8 USA). Perhaps allow the user to download updates straight from NUS if they add -nus
at the end of their command?
it shouldn't take long :)
Is it possible to have the name of the game added to the folder name.
Currently just the Title ID is used.
eg. Name, Title ID
check the content type of the content, if it is 0x2003 there will be a h3 file to download.
(thanks Cyan)
Can we add a __VERSION__
attribute so my gui can grab the current running version and check for updates?
https://github.com/llakssz/FunKiiU/blob/master/FunKiiU.py#L106 says:
def download_file(url, outfname, retry_count=3, ignore_404=False, expected_size=None, chunk_size=0x4096):
0x4096 (16534 decimal) seems a strange chunk size. Should it be 0x4000 (16384 decimal)?
At the moment, if something is an update, I think the data is ignored - the title id is processed before it gets to the json parser.
It would be nice to fix.
aaaa.bbbbbbbbb.ccc has been changed to aaaa.bbbbbbbbb.dd, if you know what i mean.
d1=q
d2=p
FunKiiU stop downloading and freezing in the same percentage until i restart to resume i can't keep downloading same file without keep my eyes in FunKiiU and restart every 3 or 5 min
Hello, since May 13 2017 the wii u "title key site" has moved to a different domain (instead of .com now is .gq), making the -onlinetickets and -onlinekeys functions broken. can it be resolved? if not, where do i need to modify the script so that it can find the new website?
Thanks in advance, Spinoni31.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.