Hacking Command Line NUS Downloader

wiiNinja

Well-Known Member
OP
Member
Joined
Jan 13, 2009
Messages
645
Trophies
1
XP
1,755
Country
United States
I had a need to download a few of these titles and couldn't find a command line version of the NUS Downloader: http://wiibrew.org/wiki/NUS_Downloader
Luckily, the source is available (thanks WB3000), so I created this command line tool:

https://github.com/wiiNinja/NUS.downloader.command.line

It's useful if you have a bunch of titles to download, and you would like to just batch the job and go grab a soda. There's a Readme.txt file in the repo with more info about how to run. Binary, source, sample batch are included.

My changes are pretty minimal, all credits go to WB3000 for writing this great tool.

Just grab the "compiled.outputs" folder and look at the sample batch files on how to use it.

Updates:

v0.2 - Added option to retrieve latest version per WiiPower's request.
v2.0.mod1 - Same mods, using the latest code (v2.0) on SVN. Read the Readme.txt for updated details, including changed default options.
v0.3 - Based on WB3000's version 1.9
v0.6 - Created a branch dotnet3.5 - built for .NET3.5 framework at the request of XFlak - Added new options to select "wii" vs "dsi". Added option to override server URL.
v0.8 - Ported to .NET6 to allow tool to be used in both Windows and Linux natively. Since MS .NET6 does not support GUI in Linux, this port is purely CLI-based (unlike the legacy version where both GUI and CLI are supported).
 
Last edited by wiiNinja,

bdr9

Well-Known Member
Member
Joined
Jul 21, 2008
Messages
558
Trophies
0
Age
28
XP
288
Country
United States
Thanks. I don't mind using the original one, because my internet is fast and there isn't much waiting involved for me. This would be great for people who would need to wait a while because their internet is slow. Thanks again!
 

WiiPower

Well-Known Member
Member
Joined
Oct 17, 2008
Messages
8,165
Trophies
0
XP
345
Country
Gambia, The
An option to download the latest IOS version could be nice. If you use tmd instead of tmd.version, you get the latest version. Nice application.
 

wiiNinja

Well-Known Member
OP
Member
Joined
Jan 13, 2009
Messages
645
Trophies
1
XP
1,755
Country
United States
It's probably more useful for cases where you want to download a whole bunch and just want to run a single batch file like this:

SampleBatch.bat content:


Code:
nusd 000000010000000b 10
nusd 000000010000000c 6
nusd 000000010000000d 10
nusd 000000010000000f 257
nusd 0000000100000011 512
nusd 0000000100000014 12
nusd 0000000100000015 514
nusd 000000010000001e 1040
nusd 000000010000001f 1040
nusd 0000000100000021 1040
nusd 0000000100000022 1039
nusd 0000000100000023 1040
nusd 0000000100000024 1042
nusd 0000000100000025 2070
nusd 0000000100000026 3610
nusd 0000000100000035 4113
nusd 0000000100000037 4633
nusd 000000010000003c 6174
nusd 000000010000003d 4890
nusd 0000000100000002 417

Just run "SampleBatch.bat" and walk away. You don't have to sit there for the completion of one, then enter the titleID/titleVersion for another.

Posts merged

WiiPower said:
An option to download the latest IOS version could be nice. If you use tmd instead of tmd.version, you get the latest version. Nice application.

I'll take a crack at it.
 

wiiNinja

Well-Known Member
OP
Member
Joined
Jan 13, 2009
Messages
645
Trophies
1
XP
1,755
Country
United States
WiiPower said:
An option to download the latest IOS version could be nice. If you use tmd instead of tmd.version, you get the latest version. Nice application.

Thanks for the hint. I've updated the tool to allow the option of retrieving the latest version. Just replace the titleVersion with a * to download the latest.
 

Slowking

Well-Known Member
Member
Joined
Dec 31, 2006
Messages
1,403
Trophies
0
XP
260
Country
Germany
This is a really great tool and I intend to use it a lot. However I do sometime get net frameworks errors. Could you fix that wiiNinja?
 

wiiNinja

Well-Known Member
OP
Member
Joined
Jan 13, 2009
Messages
645
Trophies
1
XP
1,755
Country
United States
Didn't know anyone's still using this tool.
Without know more about your error and how to duplicate it, I wouldn't know how to fix it. What I did was just to rebuild the tool targeting .NET framework 3.5 instead of 2.0. See if this helps:

http://www.mediafire.com/file/xf1w08kfu1qk...5.framework.rar

I don't have too much time at the moment, but if there's interest, the best thing to do is to pick up the latest version of NUSD and mod that.
 

Slowking

Well-Known Member
Member
Joined
Dec 31, 2006
Messages
1,403
Trophies
0
XP
260
Country
Germany
Thx. Will try it and if the error pops up again I'll post a screenshot.

Btw. I think NUSAD uses your tool to download stuff...
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,803
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,786
Country
Cyprus
WiiNinja, A LOT of people are using this without even realizing it. I use it in NUSAD (I give u credit too, see my signature). But I guarantee any extra effort u put into making this more stable will benefit thousands of people

edit: damn, how did the SLOWKING beat me to this post! I guess he's not as slow as he sounds! lol

edit2: @ WiiNinja, is the version that targets 3.5 .net framework the same one u released months ago????????
 

wiiNinja

Well-Known Member
OP
Member
Joined
Jan 13, 2009
Messages
645
Trophies
1
XP
1,755
Country
United States
XFlak said:
WiiNinja, A LOT of people are using this without even realizing it. I use it in NUSAD (I give u credit too, see my signature). But I guarantee any extra effort u put into making this more stable will benefit thousands of people

edit: damn, how did the SLOWKING beat me to this post! I guess he's not as slow as he sounds! lol

edit2: @ WiiNinja, is the version that targets 3.5 .net framework the same one u released months ago????????

Yes, it is the same version; I just rebuilt it for .net 3.5. I'll look at the latest version and see if I can create a new version out of that. What sort of error are you seeing? Is it repeatable or just random?
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,803
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,786
Country
Cyprus
its very VERY random. It says something like... an error has occured with nusd.exe, please press exit\continue to close it or something. I wish I could remember better, the next time I get the error I will take a screenshot (but that could be a long time coming... since I've only gotten the error maybe 4 times, and I've used it regularly for over 8 months)

on the bright side, i have checks and safeguards built into NUSAD so that when/if this happens, it is caught and redownloaded

I'm gonna use this new 3.5 framework version, that may make a world of difference, we'll find out
 

Slowking

Well-Known Member
Member
Joined
Dec 31, 2006
Messages
1,403
Trophies
0
XP
260
Country
Germany
Btw. sometimes it just hangs without an error at the "XXX wrote at XXX" part.
Haven't tested the frameworks 3.5 version yet, though.

Edit: hmm the 3.5 version seems to run smoother and faster. No error yet. We'll see how it does long term. ^^

Edit2: And it hung itself again. This time without error message: http://zeldaspeedruns.com/junk/error.png
 

Slowking

Well-Known Member
Member
Joined
Dec 31, 2006
Messages
1,403
Trophies
0
XP
260
Country
Germany
Well now I encountered the frameworks error again. The 3.5 doesn't seem to fix it.
frown.gif


QUOTE said:
Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
bei System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
bei System.Windows.Forms.Control.DefWndProc(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.TextBoxBase.WndProc(Message& m)
bei System.Windows.Forms.RichTextBox.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladene Assemblys **************
mscorlib
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
----------------------------------------
nusd
Assembly-Version: 0.0.0.0.
Win32-Version: 0.0.0.0.
CodeBase: file:///h:/nusd/nusd.exe.
----------------------------------------
System.Windows.Forms
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Drawing
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Configuration
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
System.Xml
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 2.0.0.0.
Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:





Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.

Basically the program tried to read or write in protected memory...


Oh btw there is also another bug i've noticed. It packs wads even if you don't have "packwad" in the commandline...
 

wiiNinja

Well-Known Member
OP
Member
Joined
Jan 13, 2009
Messages
645
Trophies
1
XP
1,755
Country
United States
I used the latest version found on SVN (v2.0) and applied my mods again. The new mod is found here:

http://www.mediafire.com/file/8ftbcp4attdh...d1.wiiNinja.rar

See if this one crashes using the same batch that you used before. I ran this several hundred times without errors, so hopefully it'll be better. But if you do see the error again, please include your batch file so I can try it as well.

In the old version, the default "packwad" is ON, but in this new version, the default is OFF. It may impact old batch files, but I think this makes more sense.
 

Slowking

Well-Known Member
Member
Joined
Dec 31, 2006
Messages
1,403
Trophies
0
XP
260
Country
Germany
QUOTE said:
Invalid or Deleted File
The key you provided for file download was invalid. This is usually caused because the file is no longer stored on Mediafire. This occurs when the file is removed by the originating user or Mediafire.
Click here to view our help resources
frown.gif
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=pnRVIC7kS4s