Hacking UtikReader

BigPanda

Well-Known Member
OP
Member
Joined
Jul 18, 2016
Messages
221
Trophies
0
XP
1,719
Country
Belgium
Hello everyone, I just wrote a small application that extract important information from a WiiU tik file.

Enjoy if you were looking to export your Title Key from eshop tickets.

UtikReader (2016-11-16)
--------------------------------

Small application to read the Title ID, Title Key and Console ID from a WiiU tik file.
This tool does not check if the opened tik is valid. It only return value from specific offset of the file.

If the Console ID line is not filled with zeroes, it's means that the ticket include your console identifier.
 

Attachments

  • UtikReader_1-01.zip
    6.6 KB · Views: 562
Last edited by BigPanda,

BigPanda

Well-Known Member
OP
Member
Joined
Jul 18, 2016
Messages
221
Trophies
0
XP
1,719
Country
Belgium
After additional analysis, this will only work for the first ticket inside the .tik

It seems that it happens that the WiiU put multiple tiks inside a singe file. This is not always the case but it happens.

I will probably just rewrite the application to scan all files inside a folder/subfolders and store the information in a single txt file.

That version can be useful however.
 

shin-gori

Member
Newcomer
Joined
Oct 7, 2008
Messages
18
Trophies
1
XP
199
Country
Cote d'Ivoire
Hello everyone, I just wrote a small application that extract important information from a WiiU tik file.

Enjoy if you were looking to export your Title Key from eshop tickets.

UtikReader (2016-11-16)
--------------------------------

Small application to read the Title ID, Title Key and Console ID from a WiiU tik file.
This tool does not check if the opened tik is valid. It only return value from specific offset of the file.

If the Console ID line is not filled with zeroes, it's means that the ticket include your console identifier.
Works for virtual console .tik??
 

oji

Well-Known Member
Member
Joined
Sep 1, 2012
Messages
437
Trophies
1
Location
In Soviet Russia you're the Location
XP
2,429
Country
Russia
After additional analysis, this will only work for the first ticket inside the .tik

It seems that it happens that the WiiU put multiple tiks inside a singe file. This is not always the case but it happens.

I will probably just rewrite the application to scan all files inside a folder/subfolders and store the information in a single txt file.

That version can be useful however.

Check out my PoSh script, which is able to parse a multi-ticket files. Feel free to reuse it's algorithm in your project.

Code:
$atom = 694

function Export-WiiUTik ($data, $start) {
($start + 476)..($start + 483) | % {$title+= "{0:X2} " -f $data[$_]}
$title = ([string]$title -replace " ", "").ToLower()
($start + 447)..($start + 462) | % {$key+= "{0:X2} " -f $data[$_]}
$key = ([string]$key -replace " ", "").ToLower()
return $title + " " + $key
}


function Parse-WiiUTik ($path) {
$file = get-content $path -Encoding Byte
$cnt = 0
$sw = 0
do {
switch ($sw) {
0 {if ($file[$cnt] -eq 0) {$sw = $sw -bor 1}}
1 {if ($file[$cnt] -eq 1) {$sw = $sw -bor 2} else {$sw = 0}}
3 {if ($file[$cnt] -eq 0) {$sw = $sw -bor 4} else {$sw = 0}}
7 {if ($file[$cnt] -eq 4) {Export-WiiUTik $file ($cnt - 3); $cnt += $atom - 4; $sw = 0} else {$sw = 0}}
}
$cnt++
} while ($file.count -gt ($cnt + $atom - 4))
}

Get-ChildItem *.tik -recurse | % {Parse-WiiUTik $_.fullname}
 
  • Like
Reactions: BigPanda

DaBlackDeath

.::[ lone wolf ]::.
Member
Joined
Dec 22, 2007
Messages
928
Trophies
2
XP
4,453
Country
Germany
I have also made some "fun project" like this, but I guess it's not the right place to share it because this thread is for OP's tool.
Maybe a hint for OP, what he could add (check preview) :)
oops
 
Last edited by DaBlackDeath,
  • Like
Reactions: BigPanda

oji

Well-Known Member
Member
Joined
Sep 1, 2012
Messages
437
Trophies
1
Location
In Soviet Russia you're the Location
XP
2,429
Country
Russia
I didn't know a tik could have multiple ticket info.
Which game uses this format, and why?
Some tik files have a merged tickets, but I don't know what a reason make it happens. For example, there's the tik in my system which is contained a Sega All-star Racing update, a Tokyo Mirage Session DLC & an eShop title, all are in the one file.
 

BigPanda

Well-Known Member
OP
Member
Joined
Jul 18, 2016
Messages
221
Trophies
0
XP
1,719
Country
Belgium
Some tik files have a merged tickets, but I don't know what a reason make it happens. For example, there's the tik in my system which is contained a Sega All-star Racing update, a Tokyo Mirage Session DLC & an eShop title, all are in the one file.

Yes, I wanted to extract my tickets so I could have a backup copies of the installable titles locally. However, I was missing many many Virtual Console titles when I was looking with my application. At some point, I digged and saw that some tickets are 1kb and some are 2kb.

The 2kb ones are merged and includes more than one. Don't know how many tickets can be merged on the same file however.
 
Last edited by BigPanda,
  • Like
Reactions: oji

nexusmtz

Well-Known Member
Member
Joined
Feb 17, 2016
Messages
1,386
Trophies
0
XP
1,425
Country
United States
I didn't know a tik could have multiple ticket info.
Which game uses this format, and why?
The ticket directory looks like a hash table, possibly to cut down on the number of files. If that's the case, any identifier that hashes to the same value would end up in the same file. The identifier is probably just the title ID.

We'll have to do some comparisons to confirm that a given title will end up in the same tik on everyone's consoles, but I'd suspect that to be the case. With enough tickets, it may be obvious what the algorithm is.
 
  • Like
Reactions: Cyan

AboodXD

I hack NSMB games, and other shiz.
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Uh, no there isn't? If anything, there's a thread full of title IDs. The only thread on here that ever attempted to share title keys got shut down within one post.
It was a thread with a list of WUDs (not download links) and title keys...

I can't remember the name of the thread, hopefully someone still remembers... :P
 

AboodXD

I hack NSMB games, and other shiz.
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
I don't know, I remember seeing it not too long ago.

Maybe a newbie mod deleted because he didn't like?

But seriously, IIRC that thread was on GBATemp for more than a year.
 

JohnathanMonkey

Well-Known Member
Member
Joined
Apr 26, 2013
Messages
633
Trophies
1
Age
36
XP
744
Country
United States
I don't know, I remember seeing it not too long ago.

Maybe a newbie mod deleted because he didn't like?

But seriously, IIRC that thread was on GBATemp for more than a year.

Yea I got a lot of title keys from there back in the day when I used Uwizard. There was an excel document too.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: