diff --git a/nand_dump/mainwindow.cpp b/nand_dump/mainwindow.cpp
index 29725ff..2ba571a 100644
--- a/nand_dump/mainwindow.cpp
+++ b/nand_dump/mainwindow.cpp
@@ -6,10 +6,12 @@
#include "tiktmd.h"
#include "tools.h"
#include "aes.h"
+#include "wad.h"
MainWindow::MainWindow( QWidget *parent ) : QMainWindow( parent ), ui( new Ui::MainWindow ), nus ( this )
{
ui->setupUi(this);
+ Wad::SetGlobalCert( QByteArray( (const char*)&certs_dat, CERTS_DAT_SIZE ) );
//connect to the nus object so we can respond to what it is saying with pretty stuff in the gui
connect( &nus, SIGNAL( SendDownloadProgress( int ) ), ui->progressBar_dl, SLOT( setValue( int ) ) );
@@ -23,8 +25,10 @@ MainWindow::MainWindow( QWidget *parent ) : QMainWindow( parent ), ui( new Ui::M
//TODO, really get these paths from settings
ui->lineEdit_cachePath->setText( cachePath );
ui->lineEdit_nandPath->setText( nandPath );
- nand.SetPath( nandPath );
+ //nand.SetPath( nandPath );
nus.SetCachePath( cachePath );
+
+
}
MainWindow::~MainWindow()
@@ -70,6 +74,18 @@ void MainWindow::NusIsDone()
{
ui->lineEdit_nandPath->setEnabled( true );
ui->pushButton_nandPath->setEnabled( true );
+
+ //write the uid.sys and content.map to disc
+ nand.Flush();
+
+ //make sure there is a setting.txt
+ QByteArray set = nand.GetSettingTxt();
+ if( set.isEmpty() )
+ {
+ set = SettingTxtDialog::Edit( this );
+ if( !set.isEmpty() )
+ nand.SetSettingTxt( set );
+ }
}
else if( ui->radioButton_wad->isChecked() )
{
@@ -84,20 +100,11 @@ void MainWindow::NusIsDone()
void MainWindow::ReceiveTitleFromNus( NusJob job )
{
- //QString dataStuff = QString( "%1 items:" ).arg( job.data.size() );
- //for( int i = 0; i < job.data.size(); i++ )
- //dataStuff += QString( " %1" ).arg( job.data.at( i ).size(), 0, 16, QChar( ' ' ) );
-
QString str = tr( "Received a completed download from NUS" );
QString title = QString( "%1v%2" ).arg( job.tid, 16, 16, QChar( '0' ) ).arg( job.version );
- /*QString j = QString( "NusJob( %1, %2, %3, %4 )
" )
- .arg( job.tid, 16, 16, QChar( '0' ) )
- .arg( job.version ).arg( job.decrypt ? "decrypted" : "encrypted" )
- .arg( dataStuff );
- ui->plainTextEdit_log->appendHtml( j );*/
ui->plainTextEdit_log->appendHtml( str );
-return;
+
//do something with the data we got
if( ui->radioButton_folder->isChecked() )
{
@@ -113,6 +120,53 @@ return;
}
else if( ui->radioButton_wad->isChecked() )
{
+ Wad wad( job.data );
+ if( !wad.IsOk() )
+ {
+ ShowMessage( "Error making a wad from " + title + "<\b>" );
+ return;
+ }
+ QFileInfo fi( ui->lineEdit_wad->text() );
+ if( fi.isFile() )
+ {
+ ShowMessage( "" + ui->lineEdit_wad->text() + " is a file. I need a folder<\b>" );
+ return;
+ }
+ if( !fi.exists() )
+ {
+ ShowMessage( "" + fi.absoluteFilePath() + " is not a folder!\nTrying to create it...<\b>" );
+ if( !QDir().mkpath( ui->lineEdit_wad->text() ) )
+ {
+ ShowMessage( "Failed to make the directory!<\b>" );
+ return;
+ }
+ }
+ QByteArray w = wad.Data();
+ if( w.isEmpty() )
+ {
+ ShowMessage( "Error creating wad
" + wad.LastError() + "<\b>" );
+ return;
+ }
+
+ QString name = wad.WadName( fi.absoluteFilePath() );
+ if( name.isEmpty() )
+ {
+ name = QFileDialog::getSaveFileName( this, tr( "Filename for %1" ).arg( title ), fi.absoluteFilePath() );
+ if( name.isEmpty() )
+ {
+ ShowMessage( "No save name given, aborting<\b>" );
+ return;
+ }
+ }
+ QFile file( fi.absoluteFilePath() + "/" + name );
+ if( !file.open( QIODevice::WriteOnly ) )
+ {
+ ShowMessage( "Cant open " + fi.absoluteFilePath() + "/" + name + " for writing<\b>" );
+ return;
+ }
+ file.write( w );
+ file.close();
+ ShowMessage( "Saved " + title + " to " + fi.absoluteFilePath() + "/" + name );
}
//bool r = nand.InstallNusItem( job );
@@ -123,25 +177,35 @@ return;
void MainWindow::on_pushButton_GetTitle_clicked()
{
bool ok = false;
- quint64 tid = ui->lineEdit_tid->text().toLongLong( &ok, 16 );
- if( !ok )
+ bool wholeUpdate = false;
+ quint64 tid = 0;
+ quint32 ver = 0;
+ if( ui->lineEdit_tid->text().size() == 4 )
{
- ShowMessage( "Error converting \"" + ui->lineEdit_tid->text() + "\" to a hex number." );
- return;
+ wholeUpdate = true;
}
- quint32 ver = TITLE_LATEST_VERSION;
- if( !ui->lineEdit_version->text().isEmpty() )
+ else
{
- ver = ui->lineEdit_version->text().toInt( &ok, 10 );
+ tid = ui->lineEdit_tid->text().toLongLong( &ok, 16 );
if( !ok )
{
- ShowMessage( "Error converting \"" + ui->lineEdit_version->text() + "\" to a decimal number." );
+ ShowMessage( "Error converting \"" + ui->lineEdit_tid->text() + "\" to a hex number." );
return;
}
- if( ver > 0xffff )
+ ver = TITLE_LATEST_VERSION;
+ if( !ui->lineEdit_version->text().isEmpty() )
{
- ShowMessage( tr( "Version %1 is too high. Max is 65535" ).arg( ver ) );
- return;
+ ver = ui->lineEdit_version->text().toInt( &ok, 10 );
+ if( !ok )
+ {
+ ShowMessage( "Error converting \"" + ui->lineEdit_version->text() + "\" to a decimal number." );
+ return;
+ }
+ if( ver > 0xffff )
+ {
+ ShowMessage( tr( "Version %1 is too high. Max is 65535" ).arg( ver ) );
+ return;
+ }
}
}
//decide how we want nus to give us the title
@@ -187,7 +251,18 @@ void MainWindow::on_pushButton_GetTitle_clicked()
//ui->progressBar_title->setValue( 0 );
//ui->progressBar_whole->setValue( 0 );
nus.SetCachePath( ui->lineEdit_cachePath->text() );
- nus.Get( tid, decrypt, ver );
+ if( wholeUpdate )
+ {
+ if( !nus.GetUpdate( ui->lineEdit_tid->text(), decrypt ) )
+ {
+ ShowMessage( tr( "I dont know the titles that were in the %1 update" ).arg( ui->lineEdit_tid->text() ) );
+ return;
+ }
+ }
+ else
+ {
+ nus.Get( tid, decrypt, ver );
+ }
}
//ratio buttons toggled
@@ -233,10 +308,42 @@ void MainWindow::on_pushButton_decFolder_clicked()
void MainWindow::on_pushButton_wad_clicked()
{
- QString path = ui->lineEdit_wad->text().isEmpty() ? "/media" : ui->lineEdit_wad->text();
+ QString path = ui->lineEdit_wad->text().isEmpty() ? QDir::currentPath() : ui->lineEdit_wad->text();
QString f = QFileDialog::getExistingDirectory( this, tr( "Select folder to save wads to" ), path );
if( f.isEmpty() )
return;
ui->lineEdit_wad->setText( f );
}
+
+
+/*
+ 3.4j-
+Error getting title from NUS: Error downloading part of the title.
+NusJob( 0001000248414b4a, 2, decrypted, 0 items: )
+
+Error getting title from NUS: Error downloading part of the title.
+NusJob( 0001000248414c4a, 2, decrypted, 0 items: )
+
+Received a completed download from NUS
+Installed 0001000248415941v2 title to nand
+
+Received a completed download from NUS
+Error 000100084843434av0 title to nand
+
+4.0j
+Error getting title from NUS: Error downloading part of the title.
+NusJob( 0001000248414b4a, 2, decrypted, 0 items: )
+
+Error getting title from NUS: Error downloading part of the title.
+NusJob( 0001000248414c4a, 2, decrypted, 0 items: )
+
+Received a completed download from NUS
+Installed 0001000248415941v3 title to nand
+
+Error getting title from NUS: Error downloading part of the title.
+NusJob( 000100024843434a, 1, decrypted, 0 items: )
+
+Received a completed download from NUS
+Error 000100084843434av0 title to nand
+*/
diff --git a/nand_dump/mainwindow.h b/nand_dump/mainwindow.h
index 6a557ee..e05e34e 100644
--- a/nand_dump/mainwindow.h
+++ b/nand_dump/mainwindow.h
@@ -25,6 +25,8 @@ private:
void ShowMessage( const QString& mes );
+
+
public slots:
//slots for getting info from the NUS downloader
void GetError( const QString &message, NusJob job );
diff --git a/nand_dump/nanddump.cpp b/nand_dump/nanddump.cpp
index fb913ae..ae60900 100644
--- a/nand_dump/nanddump.cpp
+++ b/nand_dump/nanddump.cpp
@@ -298,7 +298,7 @@ bool NandDump::RecurseDeleteFolder( const QString &path )
bool NandDump::InstallNusItem( NusJob job )
{
- if( !job.tid || !job.version || job.data.size() < 3 )
+ if( !job.tid || job.data.size() < 3 )
{
qWarning() << "NandDump::InstallNusItem -> invalid item";
return false;
diff --git a/nand_dump/nusdownloader.cpp b/nand_dump/nusdownloader.cpp
index 2b938b8..14883d2 100644
--- a/nand_dump/nusdownloader.cpp
+++ b/nand_dump/nusdownloader.cpp
@@ -305,7 +305,7 @@ void NusDownloader::GetNextItemForCurrentTitle()
QString NusDownloader::GetCachePath( quint32 idx )
{
//qDebug() << "NusDownloader::GetCachePath" << currentJob.version << currentJob.tid;
- if( !currentJob.version || !currentJob.tid )//c'mon guy
+ if( currentJob.version == TITLE_LATEST_VERSION || !currentJob.tid )//c'mon guy
return QString();
QString path = cachePath;
@@ -532,347 +532,271 @@ bool NusDownloader::GetUpdate( const QString & upd, bool decrypt )
QString s = upd.toLower();
QMap< quint64, quint16 > titles;
+ //hell, give everybody these.
titles.insert( 0x1000248414741ull, 0x3 );//news channel HAGA
titles.insert( 0x1000248414641ull, 0x3 );//Weather Channel HAFA
- if( s.endsWith( "u" ) )//add titles as they are on the wiimposter logs
+ if( s == "2.1e" ) titles = List21e();
+ else if( s == "3.0e" ) titles = List30e();
+ else if( s == "3.1e" ) titles = List31e();
+ else if( s == "3.4e" ) titles = List34e();
+ else if( s == "4.0e" ) titles = List40e();
+ else if( s == "4.1e" ) titles = List41e();
+ else if( s == "4.2e" ) titles = List42e();
+ else if( s == "4.3e" ) titles = List43e();
+
+ else if( s == "2.0u" ) titles = List20u();
+ else if( s == "3.0u" ) titles = List30u();
+ else if( s == "3.1u" ) titles = List31u();
+ else if( s == "3.2u" ) titles = List32u();
+ else if( s == "3.3u" ) titles = List33u();
+ else if( s == "3.4u" ) titles = List34u();
+ else if( s == "4.0u" ) titles = List40u();
+ else if( s == "4.1u" ) titles = List41u();
+ else if( s == "4.2u" ) titles = List42u();
+ else if( s == "4.3u" ) titles = List43u();
+
+ else if( s == "3.5k" ) titles = List35k();
+ else if( s == "4.1k" ) titles = List41k();
+ else if( s == "4.2k" ) titles = List42k();
+ else if( s == "4.3k" ) titles = List43k();
+
+ else if( s == "2.0j" ) titles = List20j();
+ else if( s == "3.1j" ) titles = List31j();
+ else if( s == "3.4j" ) titles = List34j();
+ else if( s == "4.0j" ) titles = List40j();
+ else if( s == "4.1j" ) titles = List41j();
+ else if( s == "4.2j" ) titles = List42j();
+ else if( s == "4.3j" ) titles = List43j();
+
+ else return false;//unknown update
+
+ QMap< quint64, quint16 >::ConstIterator i = titles.begin();
+ while( i != titles.end() )
{
- /*
-00010002-HAAA 00010002-48414141 Photo Channel
-00010002-HABA 00010002-48414241 Shopping Channel
-00010002-HACA 00010002-48414341 Mii Channel
-00010002-HAFx, 00010002-HAFA 00010002-484146xx, 00010002-48414641 Weather Channel
-(both HAFA and HAFx for your region are factory installed)
-00010002-HAGx, 00010002-HAGA 00010002-484147xx, 00010002-48414741 News Channel
-(both HAGA and HAGx for your region are factory installed)
-00010002-HAYA 00010002-48415941 Photo Channel 1.1
-00010001-HAEA 00010001-48414541 Wii Message Board
-(Not a channel by itself, but mailbox archives are stored under this name)
-
-00010008-HAKx 00010008-48414bxx EULA
-00010008-HALx 00010008-48414cxx rgnsel (region select)
-*/
- //2.2 ( v193 ) is on NUS but the impersonator doesnt have a log for it. need to get it from a game
-
-
- //3.2u update
- /*
- //3.3u changes
-
-
- //3.4u update
- titles.insert( 0x100000032ull, 0x1319 );
- titles.insert( 0x1000000feull, 0x2 );
- titles.insert( 0x100000002ull, 0x181 );
- titles.insert( 0x10000001eull, 0xb00 );
- titles.insert( 0x10000001full, 0xc10 );
- titles.insert( 0x100000025ull, 0xe19 );
- titles.insert( 0x100000100ull, 0x5 );
- titles.insert( 0x100000101ull, 0x9 );
- titles.insert( 0x1000248414341ull, 0x6 );
- titles.insert( 0x100000010ull, 0x200 );
- titles.insert( 0x100000026ull, 0xe1a );
- titles.insert( 0x100000035ull, 0x141d );
- titles.insert( 0x100000037ull, 0x141d );
- titles.insert( 0x10000003cull, 0x181e );
- titles.insert( 0x10000003dull, 0x131a );
- titles.insert( 0x100000009ull, 0x209 );
- titles.insert( 0x10000000cull, 0xc );
- titles.insert( 0x10000000dull, 0x10 );
- titles.insert( 0x10000000eull, 0x107 );
- titles.insert( 0x10000000full, 0x10a );
- titles.insert( 0x100000011ull, 0x206 );
- titles.insert( 0x100000015ull, 0x20d );
- titles.insert( 0x100000016ull, 0x309 );
- titles.insert( 0x10000001cull, 0x50d );
- titles.insert( 0x10000001full, 0xc14 );
- titles.insert( 0x100000021ull, 0xb12 );
- titles.insert( 0x100000022ull, 0xc0f );
- titles.insert( 0x100000032ull, 0x1319 );
- titles.insert( 0x100000024ull, 0xc16 );
- titles.insert( 0x100000025ull, 0xe1c );
- titles.insert( 0x1000000feull, 0x3 );
-
- //4.0u update
- titles.insert( 0x100000002ull, 0x1a1 );
- titles.insert( 0x100000032ull, 0x1400 );
- titles.insert( 0x100000033ull, 0x1300 );
- titles.insert( 0x1000248414241ull, 0x10 );
- titles.insert( 0x1000248415941ull, 0x3 );
-
- //4.1u update
- titles.insert( 0x100000002ull, 0x1c1 );
-
- //4.2u update
- //titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
- titles.insert( 0x100000038ull, 0x151d );
- titles.insert( 0x100000039ull, 0x161d );
- titles.insert( 0x100000046ull, 0x1a1f );
- titles.insert( 0x1000000deull, 0xff00 );
- titles.insert( 0x1000000dfull, 0xff00 );
- titles.insert( 0x1000000f9ull, 0xff00 );
- titles.insert( 0x1000000faull, 0xff00 );
- titles.insert( 0x100000002ull, 0x1e1 );
- titles.insert( 0x100000009ull, 0x30a );
- titles.insert( 0x10000000cull, 0x10d );
- titles.insert( 0x10000000dull, 0x111 );
- titles.insert( 0x10000000eull, 0x208 );
- titles.insert( 0x10000000full, 0x20b );
- titles.insert( 0x100000011ull, 0x307 );
- titles.insert( 0x100000015ull, 0x30e );
- titles.insert( 0x100000016ull, 0x40d );
- titles.insert( 0x10000001cull, 0x60e );
- titles.insert( 0x10000001full, 0xd15 );
- titles.insert( 0x100000021ull, 0xc13 );
- titles.insert( 0x100000022ull, 0xd14 );
- titles.insert( 0x100000023ull, 0xd15 );
- titles.insert( 0x100000024ull, 0xd17 );
- titles.insert( 0x100000025ull, 0xf1d );
- titles.insert( 0x100000026ull, 0xf1b );
- titles.insert( 0x100000035ull, 0x151e );
- titles.insert( 0x100000037ull, 0x151e );
- titles.insert( 0x10000003cull, 0x1900 );
- titles.insert( 0x10000003dull, 0x151d );
- titles.insert( 0x1000000feull, 0x104 );
- titles.insert( 0x100000100ull, 0x6 );
- titles.insert( 0x100000101ull, 0xa );
- titles.insert( 0x1000248414241ull, 0x12 );
-
- //4.3u update
- //4.3u update
- titles.insert( 0x100000009ull, 0x40a ); // IOS9
- titles.insert( 0x10000000cull, 0x20e ); // IOS12
- titles.insert( 0x10000000dull, 0x408 ); // IOS13
- titles.insert( 0x10000000eull, 0x408 ); // IOS14
- titles.insert( 0x10000000full, 0x408 ); // IOS15
- titles.insert( 0x100000011ull, 0x408 ); // IOS17
- titles.insert( 0x100000015ull, 0x40f ); // IOS21
- titles.insert( 0x100000016ull, 0x50e ); // IOS22
- titles.insert( 0x10000001cull, 0x70f ); // IOS28
- titles.insert( 0x10000001full, 0xe18 ); // IOS31
- titles.insert( 0x100000021ull, 0xe18 ); // IOS33
- titles.insert( 0x100000021ull, 0xe18 ); // IOS34
- titles.insert( 0x100000023ull, 0xe18 ); // IOS35
- titles.insert( 0x100000024ull, 0xe18 ); // IOS36
- titles.insert( 0x100000025ull, 0x161f ); // IOS37
- titles.insert( 0x100000026ull, 0x101c ); // IOS38
- titles.insert( 0x100000028ull, 0xc00 ); // IOS40
- titles.insert( 0x100000029ull, 0xe17 ); // IOS41
- titles.insert( 0x10000002bull, 0xe17 ); // IOS43
- titles.insert( 0x10000002dull, 0xe17 ); // IOS45
- titles.insert( 0x10000002eull, 0xe17 ); // IOS46
- titles.insert( 0x100000030ull, 0x101c ); // IOS48
- titles.insert( 0x100000034ull, 0x1700 ); // IOS52
- titles.insert( 0x100000035ull, 0x161f ); // IOS53
- titles.insert( 0x100000037ull, 0x161f ); // IOS55
- titles.insert( 0x100000038ull, 0x161e ); // IOS56
- titles.insert( 0x100000039ull, 0x171f ); // IOS57
- titles.insert( 0x10000003aull, 0x1820 ); // IOS58
- titles.insert( 0x10000003dull, 0x161e ); // IOS61
- titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
- titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
- titles.insert( 0x1000000feull, 0xff00 ); // IOS254
- titles.insert( 0x100000002ull, 0x201 ); // SystemMenu 4.3U
- titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
- titles.insert( 0x1000848414b45ull, 0x3 ); // EULA*/
-
-
-
- QMap< quint64, quint16 >::ConstIterator i = titles.begin();
- while( i != titles.end() )
- {
- Get( i.key(), decrypt, i.value() );
- i++;
- }
-
-
- /*
-
-
-
- */
-
- /*
- 3.0e ( from GH3 )
- boot2v2
- 11v10
- 12v6
- 13v10
- 15v257
- 17v512
- 20v12
- 21v514
- 30v1039
- 31v1039
- bcv2
- eula_EUv2
- forecast_EUv7
- miosv5
- newsv3
- news_EUv7
- nigaoeNRv4
- photov1
- rgnsel_EUv2
- shoppingv7
- weatherv3
- sysmenuv226
-
- 3.1e ( from rayman raving rabbids tv party )
- boot2v2
- 11v10
- 12v6
- 13v10
- 14v257
- 15v257
- 17v512
- 20v12
- 21v514
- 22v772
- 28v1288
- 30v1040
- 31v1040
- 33v1040
- 34v1039
- 35v1040
- 36v1042
- bcv2
- eula_EUv2
- forecast_EUv7
- miosv5
- newsv3
- news_EUv7
- nigaoeNRv4
- photo2v1
- rgnsel_EUv2
- shoppingv7
- weatherv3
- sysmenuv258
-
-*/
-
-//3.4e update
-titles.insert( 0x100000004ull, 0xff00 ); // IOS4
-titles.insert( 0x100000009ull, 0x209 ); // IOS9
-titles.insert( 0x10000000aull, 0x300 ); // IOS10
-titles.insert( 0x10000000bull, 0x100 ); // IOS11
-titles.insert( 0x10000000cull, 0xb ); // IOS12
-titles.insert( 0x10000000dull, 0xf ); // IOS13
-titles.insert( 0x10000000eull, 0x106 ); // IOS14
-titles.insert( 0x10000000full, 0x109 ); // IOS15
-titles.insert( 0x100000011ull, 0x205 ); // IOS17
-titles.insert( 0x100000014ull, 0x100 ); // IOS20
-titles.insert( 0x100000015ull, 0x20a ); // IOS21
-titles.insert( 0x100000016ull, 0x309 ); // IOS22
-titles.insert( 0x10000001cull, 0x50c ); // IOS28
-titles.insert( 0x10000001eull, 0xb00 ); // IOS30
-titles.insert( 0x10000001full, 0xc10 ); // IOS31
-titles.insert( 0x100000021ull, 0xb10 ); // IOS33
-titles.insert( 0x100000022ull, 0xc0f ); // IOS34
-titles.insert( 0x100000023ull, 0xc10 ); // IOS35
-titles.insert( 0x100000024ull, 0xc12 ); // IOS36
-titles.insert( 0x100000025ull, 0xe19 ); // IOS37
-titles.insert( 0x100000032ull, 0x1319 ); // IOS50
-titles.insert( 0x100000033ull, 0x1219 ); // IOS51
-titles.insert( 0x1000000feull, 0x2 ); // IOS254
-titles.insert( 0x100000002ull, 0x182 ); // SystemMenu 3.4E
-titles.insert( 0x100000100ull, 0x5 ); // BC
-titles.insert( 0x100000101ull, 0x9 ); // MIOS
-titles.insert( 0x1000248414141, 0x2 ); // Channel HAAA
-titles.insert( 0x1000248414241, 0xd ); // Channel HABA
-titles.insert( 0x1000248414341, 0x6 ); // Channel HACA
-titles.insert( 0x1000248414650, 0x7 ); // Channel HAFP
-titles.insert( 0x1000248414750, 0x7 ); // Channel HAGP
-titles.insert( 0x1000248415941, 0x2 ); // Channel HAYA
-titles.insert( 0x1000248414b50, 0x2 ); // Channel HAKP
-titles.insert( 0x1000248414c50, 0x2 ); // Channel HALP
-
-//4.0e
-titles.insert( 0x100000009ull, 0x209 ); // IOS9
-titles.insert( 0x10000000cull, 0xc ); // IOS12
-titles.insert( 0x10000000dull, 0x10 ); // IOS13
-titles.insert( 0x10000000eull, 0x107 ); // IOS14
-titles.insert( 0x10000000full, 0x10a ); // IOS15
-titles.insert( 0x100000010ull, 0x200 ); // IOS16
-titles.insert( 0x100000011ull, 0x206 ); // IOS17
-titles.insert( 0x100000015ull, 0x20d ); // IOS21
-titles.insert( 0x100000016ull, 0x30c ); // IOS22
-titles.insert( 0x10000001cull, 0x50d ); // IOS28
-titles.insert( 0x10000001full, 0xc14 ); // IOS31
-titles.insert( 0x100000021ull, 0xb12 ); // IOS33
-titles.insert( 0x100000022ull, 0xc13 ); // IOS34
-titles.insert( 0x100000023ull, 0xc14 ); // IOS35
-titles.insert( 0x100000024ull, 0xc16 ); // IOS36
-titles.insert( 0x100000025ull, 0xe1c ); // IOS37
-titles.insert( 0x100000026ull, 0xe1a ); // IOS38
-titles.insert( 0x100000032ull, 0x1400 ); // IOS50
-titles.insert( 0x100000033ull, 0x1300 ); // IOS51
-titles.insert( 0x100000035ull, 0x141d ); // IOS53
-titles.insert( 0x100000037ull, 0x141d ); // IOS55
-titles.insert( 0x10000003cull, 0x181e ); // IOS60
-titles.insert( 0x10000003dull, 0x131a ); // IOS61
-titles.insert( 0x1000000feull, 0x3 ); // IOS254
-titles.insert( 0x1000248414241, 0x10 ); // Channel HABA
-titles.insert( 0x1000248415941, 0x3 ); // Channel HAYA
-titles.insert( 0x100000002ull, 0x1a2 ); // SystemMenu 4.0E
-
-//4.1E
-titles.insert( 0x100000002ull, 0x1c2 ); // SystemMenu 4.1E
-
-//4.2E
-//titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
-titles.insert( 0x100000009ull, 0x30a ); // IOS9
-titles.insert( 0x10000000cull, 0x10d ); // IOS12
-titles.insert( 0x10000000dull, 0x111 ); // IOS13
-titles.insert( 0x10000000eull, 0x208 ); // IOS14
-titles.insert( 0x10000000full, 0x20b ); // IOS15
-titles.insert( 0x100000011ull, 0x307 ); // IOS17
-titles.insert( 0x100000015ull, 0x30e ); // IOS21
-titles.insert( 0x100000016ull, 0x40d ); // IOS22
-titles.insert( 0x10000001cull, 0x60e ); // IOS28
-titles.insert( 0x10000001full, 0xd15 ); // IOS31
-titles.insert( 0x100000021ull, 0xc13 ); // IOS33
-titles.insert( 0x100000022ull, 0xd14 ); // IOS34
-titles.insert( 0x100000023ull, 0xd15 ); // IOS35
-titles.insert( 0x100000024ull, 0xd17 ); // IOS36
-titles.insert( 0x100000025ull, 0xf1d ); // IOS37
-titles.insert( 0x100000026ull, 0xf1b ); // IOS38
-titles.insert( 0x100000035ull, 0x151e ); // IOS53
-titles.insert( 0x100000037ull, 0x151e ); // IOS55
-titles.insert( 0x100000038ull, 0x151d ); // IOS56
-titles.insert( 0x100000039ull, 0x161d ); // IOS57
-titles.insert( 0x10000003cull, 0x1900 ); // IOS60
-titles.insert( 0x10000003dull, 0x151d ); // IOS61
-titles.insert( 0x100000046ull, 0x1a1f ); // IOS70
-titles.insert( 0x1000000deull, 0xff00 ); // IOS222
-titles.insert( 0x1000000dfull, 0xff00 ); // IOS223
-titles.insert( 0x1000000f9ull, 0xff00 ); // IOS249
-titles.insert( 0x1000000faull, 0xff00 ); // IOS250
-titles.insert( 0x1000000feull, 0x104 ); // IOS254
-titles.insert( 0x100000100ull, 0x6 ); // BC
-titles.insert( 0x100000101ull, 0xa ); // MIOS
-titles.insert( 0x1000248414241, 0x11 ); // Channel HABA
-titles.insert( 0x1000248414241ull, 0x12 ); // ShopChannel
-titles.insert( 0x100000002ull, 0x1e2 ); // SystemMenu 4.2E
-
-
-
-
-
-
-
-
-
-
+ Get( i.key(), decrypt, i.value() );
+ i++;
}
return true;
- }
-
-QMap< quint64, quint16 > NusDownloader::List30u()
+}
+QMap< quint64, quint16 > NusDownloader::List20j()
{
QMap< quint64, quint16 > titles;
- //( from GH3 )
//titles.insert( 0x100000001ull, 2 );//boot2
- titles.insert( 0x100000002ull, 225 );//sys menu
+ titles.insert( 0x100000002ull, 128 );//sys menu
+ titles.insert( 0x10000000bull, 10 );//11v10
+ titles.insert( 0x10000000cull, 6 );//12v6
+ titles.insert( 0x10000000dull, 10 );//13v10
+ titles.insert( 0x10000000full, 257 );//15v257
+ titles.insert( 0x100000011ull, 512 );//17v512
+ titles.insert( 0x100000100ull, 0x2 );//bcv2
+ titles.insert( 0x100000101ull, 0x4 );//miosv4
+ titles.insert( 0x1000848414B45ull, 0 );//EULA - HAKE
+ titles.insert( 0x1000848414C45ull, 0x2 );//regsel //region select isnt in the paper mario update, but putting it here just to be safe
+ titles.insert( 0x1000248414341ull, 0x2 );//nigaoeNRv2 - MII
+ titles.insert( 0x1000248414141ull, 0x1 );//photov1
+ titles.insert( 0x1000248414241ull, 0x4 );//shoppingv4
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List31j()
+{
+ QMap< quint64, quint16 > titles = List20u();//TODO - missing a few in here
+ titles.insert( 0x100000002ull, 256 );//sys menu
+ titles.insert( 0x10000000eull, 262 );//14v262 - should actually be 14v257 but that version isnt available on NUS
+ titles.insert( 0x100000014ull, 12 );//20v12
+ titles.insert( 0x100000015ull, 514 );//21v514
+ titles.insert( 0x100000016ull, 772 );//22v772
+ titles.insert( 0x10000001cull, 1228 );//28v1228
+ titles.insert( 0x10000001eull, 1040 );//30v1040
+ titles.insert( 0x10000001full, 1040 );//31v1040
+ titles.insert( 0x100000021ull, 1040 );//33v1040
+ titles.insert( 0x100000022ull, 1039 );//34v1039
+ titles.insert( 0x100000023ull, 1040 );//35v1040
+ titles.insert( 0x100000024ull, 1042 );//36v1040
+ //titles.insert( 0x100000025ull, 2070 );//37v2070//3.1u has this one but not 3.1j??
+ titles.insert( 0x1000248415941ull, 0x1 );//photo2v1
+ titles.insert( 0x1000848414B4aull, 0 );//EULA - HAKJ
+ titles.insert( 0x100024841464a, 0x7 ); // forcast v7 HAFJ
+ titles.insert( 0x100000101ull, 5 );//miosv5
+ titles.insert( 0x1000848414C4aull, 0x2 );//regsel //region select isnt in the paper mario update, but putting it here just to be safe
+ titles.insert( 0x1000248414341ull, 0x2 );//nigaoeNRv2 - MII
+ titles.insert( 0x1000248414141ull, 0x1 );//photov1
+ titles.insert( 0x1000248414241ull, 7 );//shoppingv7
+ titles.insert( 0x100024841474aull, 0x7 ); // news v7 HAGJ
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List34j()
+{
+ QMap< quint64, quint16 > titles;
+ titles.insert( 0x100000004ull, 0xff00 ); // IOS4
+ titles.insert( 0x100000009ull, 0x208 ); // IOS9
+ titles.insert( 0x10000000aull, 0x300 ); // IOS10
+ titles.insert( 0x10000000bull, 0x100 ); // IOS11
+ titles.insert( 0x10000000cull, 0xb ); // IOS12
+ titles.insert( 0x10000000dull, 0xf ); // IOS13
+ titles.insert( 0x10000000eull, 0x106 ); // IOS14
+ titles.insert( 0x10000000full, 0x109 ); // IOS15
+ titles.insert( 0x100000011ull, 0x205 ); // IOS17
+ titles.insert( 0x100000014ull, 0x100 ); // IOS20
+ titles.insert( 0x100000015ull, 0x20a ); // IOS21
+ titles.insert( 0x100000016ull, 0x309 ); // IOS22
+ titles.insert( 0x10000001cull, 0x50c ); // IOS28
+ titles.insert( 0x10000001eull, 0xb00 ); // IOS30
+ titles.insert( 0x10000001full, 0xc10 ); // IOS31
+ titles.insert( 0x100000021ull, 0xb10 ); // IOS33
+ titles.insert( 0x100000022ull, 0xc0f ); // IOS34
+ titles.insert( 0x100000023ull, 0xc10 ); // IOS35
+ titles.insert( 0x100000024ull, 0xc12 ); // IOS36
+ titles.insert( 0x100000025ull, 0xe19 ); // IOS37
+ titles.insert( 0x100000032ull, 0x1319 ); // IOS50
+ titles.insert( 0x100000033ull, 0x1219 ); // IOS51
+ titles.insert( 0x1000000feull, 0x2 ); // IOS254
+ titles.insert( 0x100000002ull, 0x180 ); // SystemMenu 3.4J
+ titles.insert( 0x100000100ull, 0x5 ); // BC
+ titles.insert( 0x100000101ull, 0x9 ); // MIOS
+ titles.insert( 0x1000248414141ull, 0x2 ); // Channel HAAA
+ titles.insert( 0x1000248414241ull, 0xd ); // Channel HABA
+ titles.insert( 0x1000248414341ull, 0x6 ); // Channel HACA
+ titles.insert( 0x100024841464aull, 0x7 ); // Channel HAFJ
+ titles.insert( 0x100024841474aull, 0x7 ); // Channel HAGJ
+ titles.insert( 0x1000248415941ull, 0x2 ); // Channel HAYA
+ titles.insert( 0x1000848414b4aull, 0x2 ); // Channel HAKJ
+ titles.insert( 0x1000848414c4aull, 0x2 ); // Channel HALJ
+ titles.insert( 0x100084843434aull, 0x0); // Channel HCCJ
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List40j()
+{
+ QMap< quint64, quint16 > titles = List34j();
+ titles.insert( 0x100000009ull, 0x209 ); // IOS9
+ titles.insert( 0x10000000cull, 0xc ); // IOS12
+ titles.insert( 0x10000000dull, 0x10 ); // IOS13
+ titles.insert( 0x10000000eull, 0x107 ); // IOS14
+ titles.insert( 0x10000000full, 0x10a ); // IOS15
+ titles.insert( 0x100000010ull, 0x200 ); // IOS16
+ titles.insert( 0x100000011ull, 0x206 ); // IOS17
+ titles.insert( 0x100000015ull, 0x20d ); // IOS21
+ titles.insert( 0x100000016ull, 0x30c ); // IOS22
+ titles.insert( 0x10000001cull, 0x50d ); // IOS28
+ titles.insert( 0x10000001full, 0xc14 ); // IOS31
+ titles.insert( 0x100000021ull, 0xb12 ); // IOS33
+ titles.insert( 0x100000022ull, 0xc13 ); // IOS34
+ titles.insert( 0x100000023ull, 0xc14 ); // IOS35
+ titles.insert( 0x100000024ull, 0xc16 ); // IOS36
+ titles.insert( 0x100000025ull, 0xe1c ); // IOS37
+ titles.insert( 0x100000026ull, 0xe1a ); // IOS38
+ titles.insert( 0x100000032ull, 0x1400 ); // IOS50
+ titles.insert( 0x100000033ull, 0x1300 ); // IOS51
+ titles.insert( 0x100000035ull, 0x141d ); // IOS53
+ titles.insert( 0x100000037ull, 0x141d ); // IOS55
+ titles.insert( 0x10000003cull, 0x181e ); // IOS60
+ titles.insert( 0x10000003dull, 0x131a ); // IOS61
+ titles.insert( 0x1000000feull, 0x3 ); // IOS254
+ titles.insert( 0x1000248414241ull, 0x10 ); // Channel HABA
+ titles.insert( 0x1000248415941ull, 0x3 ); // Channel HAYA
+ titles.insert( 0x100024843434aull, 0x1 ); // Channel HCCJ
+ titles.insert( 0x100000002ull, 0x1a0 ); // SystemMenu 4.0J
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List41j()
+{
+ QMap< quint64, quint16 > titles = List40j();
+ titles.insert( 0x100000002ull, 0x1c0 ); // SystemMenu 4.1E
+ titles.insert( 0x100024843434aull, 0x2 ); // Channel HCCJ
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List42j()
+{
+ QMap< quint64, quint16 > titles = List41j();
+ //titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
+ titles.insert( 0x100000009ull, 0x30a ); // IOS9
+ titles.insert( 0x10000000cull, 0x10d ); // IOS12
+ titles.insert( 0x10000000dull, 0x111 ); // IOS13
+ titles.insert( 0x10000000eull, 0x208 ); // IOS14
+ titles.insert( 0x10000000full, 0x20b ); // IOS15
+ titles.insert( 0x100000011ull, 0x307 ); // IOS17
+ titles.insert( 0x100000015ull, 0x30e ); // IOS21
+ titles.insert( 0x100000016ull, 0x40d ); // IOS22
+ titles.insert( 0x10000001cull, 0x60e ); // IOS28
+ titles.insert( 0x10000001full, 0xd15 ); // IOS31
+ titles.insert( 0x100000021ull, 0xc13 ); // IOS33
+ titles.insert( 0x100000022ull, 0xd14 ); // IOS34
+ titles.insert( 0x100000023ull, 0xd15 ); // IOS35
+ titles.insert( 0x100000024ull, 0xd17 ); // IOS36
+ titles.insert( 0x100000025ull, 0xf1d ); // IOS37
+ titles.insert( 0x100000026ull, 0xf1b ); // IOS38
+ titles.insert( 0x100000035ull, 0x151e ); // IOS53
+ titles.insert( 0x100000037ull, 0x151e ); // IOS55
+ titles.insert( 0x100000038ull, 0x151d ); // IOS56
+ titles.insert( 0x100000039ull, 0x161d ); // IOS57
+ titles.insert( 0x10000003cull, 0x1900 ); // IOS60
+ titles.insert( 0x10000003dull, 0x151d ); // IOS61
+ titles.insert( 0x100000046ull, 0x1a1f ); // IOS70
+ titles.insert( 0x1000000deull, 0xff00 ); // IOS222
+ titles.insert( 0x1000000dfull, 0xff00 ); // IOS223
+ titles.insert( 0x1000000f9ull, 0xff00 ); // IOS249
+ titles.insert( 0x1000000faull, 0xff00 ); // IOS250
+ titles.insert( 0x1000000feull, 0x104 ); // IOS254
+ titles.insert( 0x100000100ull, 0x6 ); // BC
+ titles.insert( 0x100000101ull, 0xa ); // MIOS
+ titles.insert( 0x1000248414241ull, 0x11 ); // Channel HABA
+ titles.insert( 0x1000248414241ull, 0x12 ); // ShopChannel
+ titles.insert( 0x100000002ull, 0x1e0 ); // SystemMenu 4.2J
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List43j()
+{
+ QMap< quint64, quint16 > titles = List42j();
+ titles.insert( 0x100000009ull, 0x40a ); // IOS9
+ titles.insert( 0x10000000cull, 0x20e ); // IOS12
+ titles.insert( 0x10000000dull, 0x408 ); // IOS13
+ titles.insert( 0x10000000eull, 0x408 ); // IOS14
+ titles.insert( 0x10000000full, 0x408 ); // IOS15
+ titles.insert( 0x100000011ull, 0x408 ); // IOS17
+ titles.insert( 0x100000015ull, 0x40f ); // IOS21
+ titles.insert( 0x100000016ull, 0x50e ); // IOS22
+ titles.insert( 0x10000001cull, 0x70f ); // IOS28
+ titles.insert( 0x10000001full, 0xe18 ); // IOS31
+ titles.insert( 0x100000021ull, 0xe18 ); // IOS33
+ titles.insert( 0x100000022ull, 0xe18 ); // IOS34
+ titles.insert( 0x100000023ull, 0xe18 ); // IOS35
+ titles.insert( 0x100000024ull, 0xe18 ); // IOS36
+ titles.insert( 0x100000025ull, 0x161f ); // IOS37
+ titles.insert( 0x100000026ull, 0x101c ); // IOS38
+ titles.insert( 0x100000028ull, 0xc00 ); // IOS40
+ titles.insert( 0x100000029ull, 0xe17 ); // IOS41
+ titles.insert( 0x10000002bull, 0xe17 ); // IOS43
+ titles.insert( 0x10000002dull, 0xe17 ); // IOS45
+ titles.insert( 0x10000002eull, 0xe17 ); // IOS46
+ titles.insert( 0x100000030ull, 0x101c ); // IOS48
+ titles.insert( 0x100000034ull, 0x1700 ); // IOS52
+ titles.insert( 0x100000035ull, 0x161f ); // IOS53
+ titles.insert( 0x100000037ull, 0x161f ); // IOS55
+ titles.insert( 0x100000038ull, 0x161e ); // IOS56
+ titles.insert( 0x100000039ull, 0x171f ); // IOS57
+ titles.insert( 0x10000003aull, 0x1820 ); // IOS58
+ titles.insert( 0x10000003dull, 0x161e ); // IOS61
+ titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
+ titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
+ titles.insert( 0x1000000feull, 0xff00 ); // IOS254
+ titles.insert( 0x1000848414b4aull, 0x3 ); // EULA
+ titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
+ titles.insert( 0x100000002ull, 0x200 ); // SystemMenu 4.3J
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List21e()
+{
+ QMap< quint64, quint16 > titles;
+ //( from metroid 3 )
+ //titles.insert( 0x100000001ull, 2 );//boot2
+ titles.insert( 0x100000002ull, 162 );//sys menu
titles.insert( 0x10000000bull, 10 );//11v10
titles.insert( 0x10000000cull, 6 );//12v6
titles.insert( 0x10000000dull, 10 );//13v10
@@ -880,19 +804,266 @@ QMap< quint64, quint16 > NusDownloader::List30u()
titles.insert( 0x100000011ull, 512 );//17v512
titles.insert( 0x100000014ull, 12 );//20v12
titles.insert( 0x100000015ull, 514 );//21v514
+ titles.insert( 0x100000016ull, 772 );//22v772
+ titles.insert( 0x10000001cull, 1228 );//28v1228
+ titles.insert( 0x100000100ull, 0x2 );//bcv2
+ titles.insert( 0x100000101ull, 0x4 );//miosv4
+ titles.insert( 0x1000848414B50ull, 0 );//EULA - HAKP
+ titles.insert( 0x1000848414C50ull, 0x2 );//regsel //region select isnt in the paper mario update, but putting it here just to be safe
+ titles.insert( 0x1000248414341ull, 0x2 );//nigaoeNRv2 - MII
+ titles.insert( 0x1000248414141ull, 0x1 );//photov1
+ titles.insert( 0x1000248414241ull, 0x4 );//shoppingv4
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List30e()
+{
+ QMap< quint64, quint16 > titles = List21e();
+ //( from GH 3 )
+ titles.insert( 0x100000002ull, 226 );//sys menu
+ titles.insert( 0x100000100ull, 0x2 );//bcv2
+ titles.insert( 0x10000001eull, 1039 );//30v1039
+ titles.insert( 0x10000001full, 1039 );//31v1039
+ titles.insert( 0x100000101ull, 5 );//miosv5
+ titles.insert( 0x1000848414B50ull, 2 );//EULA - HAKP
+ titles.insert( 0x1000248414650ull, 0x7 ); // forcast v7 HAFP
+ titles.insert( 0x1000248414750ull, 0x7 ); // news v7 HAGP
+ titles.insert( 0x1000848414C50ull, 0x2 );//regsel
+ titles.insert( 0x1000248414341ull, 4 );//nigaoeNRv4 - MII
+ titles.insert( 0x1000248414141ull, 0x1 );//photov1
+ titles.insert( 0x1000248414241ull, 7 );//shoppingv7
+ titles.insert( 0x1000248414741ull, 0x3 );//news channel HAGA
+ titles.insert( 0x1000248414641ull, 0x3 );//Weather Channel HAFA
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List31e()
+{
+ QMap< quint64, quint16 > titles = List30e();
+ //( from rayman raving rabbids tv party )
+ titles.insert( 0x10000000eull, 257 );//14v257
+ titles.insert( 0x10000001eull, 1040 );//30v1040
+ titles.insert( 0x10000001full, 1040 );//31v1040
+ titles.insert( 0x100000021ull, 1040 );//33v1040
+ titles.insert( 0x100000022ull, 1039 );//34v1039
+ titles.insert( 0x100000023ull, 1040 );//35v1040
+ titles.insert( 0x100000024ull, 1042 );//36v1042
+ titles.insert( 0x100000002ull, 258 );//sys menu
+ titles.insert( 0x100000100ull, 0x2 );//bcv2
+ titles.insert( 0x10000001eull, 1039 );//30v1039
+ titles.insert( 0x10000001full, 1039 );//31v1039
+ titles.insert( 0x100000101ull, 5 );//miosv5
+ titles.insert( 0x1000848414B50ull, 2 );//EULA - HAKP
+ titles.insert( 0x1000248414650ull, 0x7 ); // forcast v7 HAFP
+ titles.insert( 0x1000248414750ull, 0x7 ); // news v7 HAGP
+ titles.insert( 0x1000848414C50ull, 0x2 );//regsel
+ titles.insert( 0x1000248414341ull, 4 );//nigaoeNRv4 - MII
+ titles.insert( 0x1000248415941ull, 0x2 ); // photo channel 1.1 HAYA
+ titles.insert( 0x1000248414141ull, 0x1 );//photov1
+ titles.insert( 0x1000248414241ull, 7 );//shoppingv7
+ titles.insert( 0x1000248414741ull, 0x3 );//news channel HAGA
+ titles.insert( 0x1000248414641ull, 0x3 );//Weather Channel HAFA
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List34e()
+{
+ QMap< quint64, quint16 > titles;
+ titles.insert( 0x100000004ull, 0xff00 ); // IOS4
+ titles.insert( 0x100000009ull, 0x208 ); // IOS9
+ titles.insert( 0x10000000aull, 0x300 ); // IOS10
+ titles.insert( 0x10000000bull, 0x100 ); // IOS11
+ titles.insert( 0x10000000cull, 0xb ); // IOS12
+ titles.insert( 0x10000000dull, 0xf ); // IOS13
+ titles.insert( 0x10000000eull, 0x106 ); // IOS14
+ titles.insert( 0x10000000full, 0x109 ); // IOS15
+ titles.insert( 0x100000011ull, 0x205 ); // IOS17
+ titles.insert( 0x100000014ull, 0x100 ); // IOS20
+ titles.insert( 0x100000015ull, 0x20a ); // IOS21
+ titles.insert( 0x100000016ull, 0x309 ); // IOS22
+ titles.insert( 0x10000001cull, 0x50c ); // IOS28
+ titles.insert( 0x10000001eull, 0xb00 ); // IOS30
+ titles.insert( 0x10000001full, 0xc10 ); // IOS31
+ titles.insert( 0x100000021ull, 0xb10 ); // IOS33
+ titles.insert( 0x100000022ull, 0xc0f ); // IOS34
+ titles.insert( 0x100000023ull, 0xc10 ); // IOS35
+ titles.insert( 0x100000024ull, 0xc12 ); // IOS36
+ titles.insert( 0x100000025ull, 0xe19 ); // IOS37
+ titles.insert( 0x100000032ull, 0x1319 ); // IOS50
+ titles.insert( 0x100000033ull, 0x1219 ); // IOS51
+ titles.insert( 0x1000000feull, 0x2 ); // IOS254
+ titles.insert( 0x100000002ull, 0x182 ); // SystemMenu 3.4E
+ titles.insert( 0x100000100ull, 0x5 ); // BC
+ titles.insert( 0x100000101ull, 0x9 ); // MIOS
+ titles.insert( 0x1000248414141ull, 0x2 ); // Channel HAAA
+ titles.insert( 0x1000248414241ull, 0xd ); // Channel HABA
+ titles.insert( 0x1000248414341ull, 0x6 ); // Channel HACA
+ titles.insert( 0x1000248414650ull, 0x7 ); // Channel HAFP
+ titles.insert( 0x1000248414750ull, 0x7 ); // Channel HAGP
+ titles.insert( 0x1000248415941ull, 0x2 ); // Channel HAYA
+ titles.insert( 0x1000248414b50ull, 0x2 ); // Channel HAKP
+ titles.insert( 0x1000248414c50ull, 0x2 ); // Channel HALP
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List40e()
+{
+ QMap< quint64, quint16 > titles = List34e();
+ titles.insert( 0x100000009ull, 0x209 ); // IOS9
+ titles.insert( 0x10000000cull, 0xc ); // IOS12
+ titles.insert( 0x10000000dull, 0x10 ); // IOS13
+ titles.insert( 0x10000000eull, 0x107 ); // IOS14
+ titles.insert( 0x10000000full, 0x10a ); // IOS15
+ titles.insert( 0x100000010ull, 0x200 ); // IOS16
+ titles.insert( 0x100000011ull, 0x206 ); // IOS17
+ titles.insert( 0x100000015ull, 0x20d ); // IOS21
+ titles.insert( 0x100000016ull, 0x30c ); // IOS22
+ titles.insert( 0x10000001cull, 0x50d ); // IOS28
+ titles.insert( 0x10000001full, 0xc14 ); // IOS31
+ titles.insert( 0x100000021ull, 0xb12 ); // IOS33
+ titles.insert( 0x100000022ull, 0xc13 ); // IOS34
+ titles.insert( 0x100000023ull, 0xc14 ); // IOS35
+ titles.insert( 0x100000024ull, 0xc16 ); // IOS36
+ titles.insert( 0x100000025ull, 0xe1c ); // IOS37
+ titles.insert( 0x100000026ull, 0xe1a ); // IOS38
+ titles.insert( 0x100000032ull, 0x1400 ); // IOS50
+ titles.insert( 0x100000033ull, 0x1300 ); // IOS51
+ titles.insert( 0x100000035ull, 0x141d ); // IOS53
+ titles.insert( 0x100000037ull, 0x141d ); // IOS55
+ titles.insert( 0x10000003cull, 0x181e ); // IOS60
+ titles.insert( 0x10000003dull, 0x131a ); // IOS61
+ titles.insert( 0x1000000feull, 0x3 ); // IOS254
+ titles.insert( 0x1000248414241ull, 0x10 ); // Channel HABA
+ titles.insert( 0x1000248415941ull, 0x3 ); // Channel HAYA
+ titles.insert( 0x100000002ull, 0x1a2 ); // SystemMenu 4.0E
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List41e()
+{
+ QMap< quint64, quint16 > titles = List40e();
+ titles.insert( 0x100000002ull, 0x1c2 ); // SystemMenu 4.1E
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List42e()
+{
+ QMap< quint64, quint16 > titles = List41e();
+ titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
+ titles.insert( 0x100000009ull, 0x30a ); // IOS9
+ titles.insert( 0x10000000cull, 0x10d ); // IOS12
+ titles.insert( 0x10000000dull, 0x111 ); // IOS13
+ titles.insert( 0x10000000eull, 0x208 ); // IOS14
+ titles.insert( 0x10000000full, 0x20b ); // IOS15
+ titles.insert( 0x100000011ull, 0x307 ); // IOS17
+ titles.insert( 0x100000015ull, 0x30e ); // IOS21
+ titles.insert( 0x100000016ull, 0x40d ); // IOS22
+ titles.insert( 0x10000001cull, 0x60e ); // IOS28
+ titles.insert( 0x10000001full, 0xd15 ); // IOS31
+ titles.insert( 0x100000021ull, 0xc13 ); // IOS33
+ titles.insert( 0x100000022ull, 0xd14 ); // IOS34
+ titles.insert( 0x100000023ull, 0xd15 ); // IOS35
+ titles.insert( 0x100000024ull, 0xd17 ); // IOS36
+ titles.insert( 0x100000025ull, 0xf1d ); // IOS37
+ titles.insert( 0x100000026ull, 0xf1b ); // IOS38
+ titles.insert( 0x100000035ull, 0x151e ); // IOS53
+ titles.insert( 0x100000037ull, 0x151e ); // IOS55
+ titles.insert( 0x100000038ull, 0x151d ); // IOS56
+ titles.insert( 0x100000039ull, 0x161d ); // IOS57
+ titles.insert( 0x10000003cull, 0x1900 ); // IOS60
+ titles.insert( 0x10000003dull, 0x151d ); // IOS61
+ titles.insert( 0x100000046ull, 0x1a1f ); // IOS70
+ titles.insert( 0x1000000deull, 0xff00 ); // IOS222
+ titles.insert( 0x1000000dfull, 0xff00 ); // IOS223
+ titles.insert( 0x1000000f9ull, 0xff00 ); // IOS249
+ titles.insert( 0x1000000faull, 0xff00 ); // IOS250
+ titles.insert( 0x1000000feull, 0x104 ); // IOS254
+ titles.insert( 0x100000100ull, 0x6 ); // BC
+ titles.insert( 0x100000101ull, 0xa ); // MIOS
+ titles.insert( 0x1000248414241ull, 0x11 ); // Channel HABA
+ titles.insert( 0x1000248414241ull, 0x12 ); // ShopChannel
+ titles.insert( 0x100000002ull, 0x1e2 ); // SystemMenu 4.2E
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List43e()
+{
+ QMap< quint64, quint16 > titles = List42e();
+ titles.insert( 0x100000009ull, 0x40a ); // IOS9
+ titles.insert( 0x10000000cull, 0x20e ); // IOS12
+ titles.insert( 0x10000000dull, 0x408 ); // IOS13
+ titles.insert( 0x10000000eull, 0x408 ); // IOS14
+ titles.insert( 0x10000000full, 0x408 ); // IOS15
+ titles.insert( 0x100000011ull, 0x408 ); // IOS17
+ titles.insert( 0x100000015ull, 0x40f ); // IOS21
+ titles.insert( 0x100000016ull, 0x50e ); // IOS22
+ titles.insert( 0x10000001cull, 0x70f ); // IOS28
+ titles.insert( 0x10000001full, 0xe18 ); // IOS31
+ titles.insert( 0x100000021ull, 0xe18 ); // IOS33
+ titles.insert( 0x100000022ull, 0xe18 ); // IOS34
+ titles.insert( 0x100000023ull, 0xe18 ); // IOS35
+ titles.insert( 0x100000024ull, 0xe18 ); // IOS36
+ titles.insert( 0x100000025ull, 0x161f ); // IOS37
+ titles.insert( 0x100000026ull, 0x101c ); // IOS38
+ titles.insert( 0x100000028ull, 0xc00 ); // IOS40
+ titles.insert( 0x100000029ull, 0xe17 ); // IOS41
+ titles.insert( 0x10000002bull, 0xe17 ); // IOS43
+ titles.insert( 0x10000002dull, 0xe17 ); // IOS45
+ titles.insert( 0x10000002eull, 0xe17 ); // IOS46
+ titles.insert( 0x100000030ull, 0x101c ); // IOS48
+ titles.insert( 0x100000034ull, 0x1700 ); // IOS52
+ titles.insert( 0x100000035ull, 0x161f ); // IOS53
+ titles.insert( 0x100000037ull, 0x161f ); // IOS55
+ titles.insert( 0x100000038ull, 0x161e ); // IOS56
+ titles.insert( 0x100000039ull, 0x171f ); // IOS57
+ titles.insert( 0x10000003aull, 0x1820 ); // IOS58
+ titles.insert( 0x10000003dull, 0x161e ); // IOS61
+ titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
+ titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
+ titles.insert( 0x1000000feull, 0xff00 ); // IOS254
+ titles.insert( 0x1000848414b50ull, 0x3 ); // EULA
+ titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
+ titles.insert( 0x100000002ull, 0x202 ); // SystemMenu 4.3E
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List20u()
+{
+ QMap< quint64, quint16 > titles;
+ //( from paper mario )
+ //titles.insert( 0x100000001ull, 2 );//boot2
+ titles.insert( 0x100000002ull, 97 );//sys menu
+ titles.insert( 0x10000000bull, 10 );//11v10
+ titles.insert( 0x10000000cull, 6 );//12v6
+ titles.insert( 0x10000000dull, 10 );//13v10
+ titles.insert( 0x10000000full, 257 );//15v257
+ titles.insert( 0x100000011ull, 512 );//17v512
+ titles.insert( 0x100000100ull, 0x2 );//bcv2
+ titles.insert( 0x100000101ull, 0x4 );//miosv4
+ titles.insert( 0x1000848414B45ull, 0 );//EULA - HAKE
+ titles.insert( 0x1000848414C45ull, 0x2 );//regsel //region select isnt in the paper mario update, but putting it here just to be safe
+ titles.insert( 0x1000248414341ull, 0x2 );//nigaoeNRv2 - MII
+ titles.insert( 0x1000248414141ull, 0x1 );//photov1
+ titles.insert( 0x1000248414241ull, 0x4 );//shoppingv4
+ return titles;
+}
+
+QMap< quint64, quint16 > NusDownloader::List30u()
+{
+ QMap< quint64, quint16 > titles = List20u();
+ //( from GH3 )
+ //titles.insert( 0x100000001ull, 2 );//boot2
+ titles.insert( 0x100000002ull, 225 );//sys menu
+ titles.insert( 0x100000014ull, 12 );//20v12
+ titles.insert( 0x100000015ull, 514 );//21v514
titles.insert( 0x10000001eull, 1039 );//30v1039
titles.insert( 0x10000001full, 1039 );//31v1039
titles.insert( 0x100000100ull, 0x2 );//bcv2
- titles.insert( 0x100000101ull, 0x5 );//miosv5
titles.insert( 0x1000848414B45ull, 0x2 );//EULA - HAKE
- titles.insert( 0x1000848414C45ull, 0x2 );//regsel
titles.insert( 0x1000248414645ull, 0x7 );//forecast
titles.insert( 0x1000248414745ull, 0x7 );//news_USv7
titles.insert( 0x1000248414341ull, 0x4 );//nigaoeNRv4 - MII
- titles.insert( 0x1000248414141ull, 0x1 );//photov1
titles.insert( 0x1000248414241ull, 0x7 );//shoppingv7
- titles.insert( 0x1000248414741ull, 0x3 );//news channel HAGA
- titles.insert( 0x1000248414641ull, 0x3 );//Weather Channel HAFA
return titles;
}
@@ -1016,461 +1187,215 @@ QMap< quint64, quint16 > NusDownloader::List34u()
QMap< quint64, quint16 > NusDownloader::List40u()
{
QMap< quint64, quint16 > titles = List34u();
+ titles.insert( 0x100000002ull, 0x1a1 );
+ titles.insert( 0x100000032ull, 0x1400 );
+ titles.insert( 0x100000033ull, 0x1300 );
+ titles.insert( 0x1000248414241ull, 0x10 );
+ titles.insert( 0x1000248415941ull, 0x3 );
+ return titles;
}
-/*
+QMap< quint64, quint16 > NusDownloader::List41u()
+{
+ QMap< quint64, quint16 > titles = List40u();
+ titles.insert( 0x100000002ull, 0x1c1 );
+ return titles;
+}
- QMap< quint64, quint16 > NusDownloader::List40u();
- QMap< quint64, quint16 > NusDownloader::List41u();
- QMap< quint64, quint16 > NusDownloader::List42u();
- QMap< quint64, quint16 > NusDownloader::List43u();
+QMap< quint64, quint16 > NusDownloader::List42u()
+{
+ QMap< quint64, quint16 > titles = List41u();
+ titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
+ titles.insert( 0x100000038ull, 0x151d );
+ titles.insert( 0x100000039ull, 0x161d );
+ titles.insert( 0x100000046ull, 0x1a1f );
+ titles.insert( 0x1000000deull, 0xff00 );
+ titles.insert( 0x1000000dfull, 0xff00 );
+ titles.insert( 0x1000000f9ull, 0xff00 );
+ titles.insert( 0x1000000faull, 0xff00 );
+ titles.insert( 0x100000002ull, 0x1e1 );
+ titles.insert( 0x100000009ull, 0x30a );
+ titles.insert( 0x10000000cull, 0x10d );
+ titles.insert( 0x10000000dull, 0x111 );
+ titles.insert( 0x10000000eull, 0x208 );
+ titles.insert( 0x10000000full, 0x20b );
+ titles.insert( 0x100000011ull, 0x307 );
+ titles.insert( 0x100000015ull, 0x30e );
+ titles.insert( 0x100000016ull, 0x40d );
+ titles.insert( 0x10000001cull, 0x60e );
+ titles.insert( 0x10000001full, 0xd15 );
+ titles.insert( 0x100000021ull, 0xc13 );
+ titles.insert( 0x100000022ull, 0xd14 );
+ titles.insert( 0x100000023ull, 0xd15 );
+ titles.insert( 0x100000024ull, 0xd17 );
+ titles.insert( 0x100000025ull, 0xf1d );
+ titles.insert( 0x100000026ull, 0xf1b );
+ titles.insert( 0x100000035ull, 0x151e );
+ titles.insert( 0x100000037ull, 0x151e );
+ titles.insert( 0x10000003cull, 0x1900 );
+ titles.insert( 0x10000003dull, 0x151d );
+ titles.insert( 0x1000000feull, 0x104 );
+ titles.insert( 0x100000100ull, 0x6 );
+ titles.insert( 0x100000101ull, 0xa );
+ titles.insert( 0x1000248414241ull, 0x12 );
+ return titles;
+}
+QMap< quint64, quint16 > NusDownloader::List43u()
+{
+ QMap< quint64, quint16 > titles = List42u();
+ titles.insert( 0x100000009ull, 0x40a ); // IOS9
+ titles.insert( 0x10000000cull, 0x20e ); // IOS12
+ titles.insert( 0x10000000dull, 0x408 ); // IOS13
+ titles.insert( 0x10000000eull, 0x408 ); // IOS14
+ titles.insert( 0x10000000full, 0x408 ); // IOS15
+ titles.insert( 0x100000011ull, 0x408 ); // IOS17
+ titles.insert( 0x100000015ull, 0x40f ); // IOS21
+ titles.insert( 0x100000016ull, 0x50e ); // IOS22
+ titles.insert( 0x10000001cull, 0x70f ); // IOS28
+ titles.insert( 0x10000001full, 0xe18 ); // IOS31
+ titles.insert( 0x100000021ull, 0xe18 ); // IOS33
+ titles.insert( 0x100000021ull, 0xe18 ); // IOS34
+ titles.insert( 0x100000023ull, 0xe18 ); // IOS35
+ titles.insert( 0x100000024ull, 0xe18 ); // IOS36
+ titles.insert( 0x100000025ull, 0x161f ); // IOS37
+ titles.insert( 0x100000026ull, 0x101c ); // IOS38
+ titles.insert( 0x100000028ull, 0xc00 ); // IOS40
+ titles.insert( 0x100000029ull, 0xe17 ); // IOS41
+ titles.insert( 0x10000002bull, 0xe17 ); // IOS43
+ titles.insert( 0x10000002dull, 0xe17 ); // IOS45
+ titles.insert( 0x10000002eull, 0xe17 ); // IOS46
+ titles.insert( 0x100000030ull, 0x101c ); // IOS48
+ titles.insert( 0x100000034ull, 0x1700 ); // IOS52
+ titles.insert( 0x100000035ull, 0x161f ); // IOS53
+ titles.insert( 0x100000037ull, 0x161f ); // IOS55
+ titles.insert( 0x100000038ull, 0x161e ); // IOS56
+ titles.insert( 0x100000039ull, 0x171f ); // IOS57
+ titles.insert( 0x10000003aull, 0x1820 ); // IOS58
+ titles.insert( 0x10000003dull, 0x161e ); // IOS61
+ titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
+ titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
+ titles.insert( 0x1000000feull, 0xff00 ); // IOS254
+ titles.insert( 0x100000002ull, 0x201 ); // SystemMenu 4.3U
+ titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
+ titles.insert( 0x1000848414b45ull, 0x3 ); // EULA
+ return titles;
+}
-*//*
-//4.3U
-titles.insert( 0x100000009ull, 0x40a ); // IOS9
-titles.insert( 0x10000000cull, 0x20e ); // IOS12
-titles.insert( 0x10000000dull, 0x408 ); // IOS13
-titles.insert( 0x10000000eull, 0x408 ); // IOS14
-titles.insert( 0x10000000full, 0x408 ); // IOS15
-titles.insert( 0x100000011ull, 0x408 ); // IOS17
-titles.insert( 0x100000015ull, 0x40f ); // IOS21
-titles.insert( 0x100000016ull, 0x50e ); // IOS22
-titles.insert( 0x10000001cull, 0x70f ); // IOS28
-titles.insert( 0x10000001full, 0xe18 ); // IOS31
-titles.insert( 0x100000021ull, 0xe18 ); // IOS33
-titles.insert( 0x100000021ull, 0xe18 ); // IOS34
-titles.insert( 0x100000023ull, 0xe18 ); // IOS35
-titles.insert( 0x100000024ull, 0xe18 ); // IOS36
-titles.insert( 0x100000025ull, 0x161f ); // IOS37
-titles.insert( 0x100000026ull, 0x101c ); // IOS38
-titles.insert( 0x100000028ull, 0xc00 ); // IOS40
-titles.insert( 0x100000029ull, 0xe17 ); // IOS41
-titles.insert( 0x10000002bull, 0xe17 ); // IOS43
-titles.insert( 0x10000002dull, 0xe17 ); // IOS45
-titles.insert( 0x10000002eull, 0xe17 ); // IOS46
-titles.insert( 0x100000030ull, 0x101c ); // IOS48
-titles.insert( 0x100000034ull, 0x1700 ); // IOS52
-titles.insert( 0x100000035ull, 0x161f ); // IOS53
-titles.insert( 0x100000037ull, 0x161f ); // IOS55
-titles.insert( 0x100000038ull, 0x161e ); // IOS56
-titles.insert( 0x100000039ull, 0x171f ); // IOS57
-titles.insert( 0x10000003aull, 0x1820 ); // IOS58
-titles.insert( 0x10000003dull, 0x161e ); // IOS61
-titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
-titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
-titles.insert( 0x1000000feull, 0xff00 ); // IOS254
-titles.insert( 0x100000002ull, 0x201 ); // SystemMenu 4.3U
-titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
-titles.insert( 0x1000848414b45ull, 0x3 ); // EULA
+QMap< quint64, quint16 > NusDownloader::List35k()
+{
+ QMap< quint64, quint16 > titles;
+ titles.insert( 0x100000004ull, 0xff00 ); // IOS4
+ titles.insert( 0x100000009ull, 0x209 ); // IOS9
+ titles.insert( 0x100000015ull, 0x20d ); // IOS21
+ titles.insert( 0x100000025ull, 0xe1c ); // IOS37
+ titles.insert( 0x100000028ull, 0xc00 ); // IOS40
+ titles.insert( 0x100000029ull, 0xb13 ); // IOS41
+ titles.insert( 0x10000002bull, 0xb13 ); // IOS43
+ titles.insert( 0x10000002dull, 0xb13 ); // IOS45
+ titles.insert( 0x10000002eull, 0xb15 ); // IOS46
+ titles.insert( 0x100000033ull, 0x1300 ); // IOS51
+ titles.insert( 0x100000034ull, 0x161d ); // IOS52
+ titles.insert( 0x100000035ull, 0x141d ); // IOS53
+ titles.insert( 0x100000037ull, 0x141d ); // IOS55
+ titles.insert( 0x10000003dull, 0x131a ); // IOS61
+ titles.insert( 0x1000000feull, 0x3 ); // IOS254
+ titles.insert( 0x100000100ull, 0x5 ); // BC
+ titles.insert( 0x100000101ull, 0x9 ); // MIOS
+ titles.insert( 0x100024841424bull, 0x10 ); // Channel HABK
+ titles.insert( 0x1000248414c4bull, 0x2 ); // Channel HALK
+ titles.insert( 0x100000002ull, 0x186 ); // SystemMenu 3.5K
+ return titles;
+}
-//2.1e ( paper mario )
-//IOS11 v10, IOS12 v6, IOS13 v10, IOS15 v257, IOS17 v512, IOS21 v514, bc v2, EULA EU v0,
-//MIOS v4, News v3, NigaoeNR-v2, PhotoChannel v1, Shopping Channel v4, Weather Channel v3, SystemMenu v162
-2.1e( metriod 3 ) - different than the paper mario one
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/BOOT2-v2-64.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS11-64-v10.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS12-64-v6.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS13-64-v10.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS15-64-v257.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS17-64-v512.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS20-64-v12.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS21-64-v514.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS22-64-v772.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/IOS28-64-v1288.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-Eulav_EU-v0.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-News-v3.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-NigaoeNR-v2.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-Shopping-v4.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-Weather-v3.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-WiiSystemmenu-v162.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-bc-v2.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-mios-v4.wad.out.wad
- ftp://10.0.8.53/dvd/0%20Update/files/_sys/RVL-photo-v1.wad.out.wad
+QMap< quint64, quint16 > NusDownloader::List41k()
+{
+ QMap< quint64, quint16 > titles = List35k();
+ titles.insert( 0x100000010ull, 0x200 ); // IOS16
+ titles.insert( 0x100000029ull, 0xc13 ); // IOS41
+ titles.insert( 0x10000002bull, 0xc13 ); // IOS43
+ titles.insert( 0x10000002dull, 0xc13 ); // IOS45
+ titles.insert( 0x10000002eull, 0xc15 ); // IOS46
+ titles.insert( 0x100000034ull, 0x1700 ); // IOS52
+ titles.insert( 0x10000003cull, 0x181e ); // IOS60
+ titles.insert( 0x100024841594bull, 0x3 ); // Channel HAYK
+ titles.insert( 0x100000002ull, 0x1c6 ); // SystemMenu 4.1K
+ return titles;
+}
-//3.4E
-titles.insert( 0x100000004ull, 0xff00 ); // IOS4
-titles.insert( 0x100000009ull, 0x208 ); // IOS9
-titles.insert( 0x10000000aull, 0x300 ); // IOS10
-titles.insert( 0x10000000bull, 0x100 ); // IOS11
-titles.insert( 0x10000000cull, 0xb ); // IOS12
-titles.insert( 0x10000000dull, 0xf ); // IOS13
-titles.insert( 0x10000000eull, 0x106 ); // IOS14
-titles.insert( 0x10000000full, 0x109 ); // IOS15
-titles.insert( 0x100000011ull, 0x205 ); // IOS17
-titles.insert( 0x100000014ull, 0x100 ); // IOS20
-titles.insert( 0x100000015ull, 0x20a ); // IOS21
-titles.insert( 0x100000016ull, 0x309 ); // IOS22
-titles.insert( 0x10000001cull, 0x50c ); // IOS28
-titles.insert( 0x10000001eull, 0xb00 ); // IOS30
-titles.insert( 0x10000001full, 0xc10 ); // IOS31
-titles.insert( 0x100000021ull, 0xb10 ); // IOS33
-titles.insert( 0x100000022ull, 0xc0f ); // IOS34
-titles.insert( 0x100000023ull, 0xc10 ); // IOS35
-titles.insert( 0x100000024ull, 0xc12 ); // IOS36
-titles.insert( 0x100000025ull, 0xe19 ); // IOS37
-titles.insert( 0x100000032ull, 0x1319 ); // IOS50
-titles.insert( 0x100000033ull, 0x1219 ); // IOS51
-titles.insert( 0x1000000feull, 0x2 ); // IOS254
-titles.insert( 0x100000002ull, 0x182 ); // SystemMenu 3.4E
-titles.insert( 0x100000100ull, 0x5 ); // BC
-titles.insert( 0x100000101ull, 0x9 ); // MIOS
-titles.insert( 0x1000248414141ull, 0x2 ); // Channel HAAA
-titles.insert( 0x1000248414241ull, 0xd ); // Channel HABA
-titles.insert( 0x1000248414341ull, 0x6 ); // Channel HACA
-titles.insert( 0x1000248414650ull, 0x7 ); // Channel HAFP
-titles.insert( 0x1000248414750ull, 0x7 ); // Channel HAGP
-titles.insert( 0x1000248415941ull, 0x2 ); // Channel HAYA
-titles.insert( 0x1000248414b50ull, 0x2 ); // Channel HAKP
-titles.insert( 0x1000248414c50ull, 0x2 ); // Channel HALP
+QMap< quint64, quint16 > NusDownloader::List42k()
+{
+ QMap< quint64, quint16 > titles = List41k();
+ //titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
+ titles.insert( 0x100000009ull, 0x30a ); // IOS9
+ titles.insert( 0x100000015ull, 0x30e ); // IOS21
+ titles.insert( 0x100000024ull, 0xd17 ); // IOS36
+ titles.insert( 0x100000025ull, 0xf1d ); // IOS37
+ titles.insert( 0x100000029ull, 0xd14 ); // IOS41
+ titles.insert( 0x10000002bull, 0xd14 ); // IOS43
+ titles.insert( 0x10000002dull, 0xd14 ); // IOS45
+ titles.insert( 0x10000002eull, 0xd16 ); // IOS46
+ titles.insert( 0x100000035ull, 0x151e ); // IOS53
+ titles.insert( 0x100000037ull, 0x151e ); // IOS55
+ titles.insert( 0x100000038ull, 0x151d ); // IOS56
+ titles.insert( 0x100000039ull, 0x161d ); // IOS57
+ titles.insert( 0x10000003cull, 0x1900 ); // IOS60
+ titles.insert( 0x10000003dull, 0x151d ); // IOS61
+ titles.insert( 0x100000046ull, 0x1a1f ); // IOS70
+ titles.insert( 0x1000000deull, 0xff00 ); // IOS222
+ titles.insert( 0x1000000dfull, 0xff00 ); // IOS223
+ titles.insert( 0x1000000f9ull, 0xff00 ); // IOS249
+ titles.insert( 0x1000000faull, 0xff00 ); // IOS250
+ titles.insert( 0x1000000feull, 0x104 ); // IOS254
+ titles.insert( 0x100000100ull, 0x6 ); // BC
+ titles.insert( 0x100000101ull, 0xa ); // MIOS
+ titles.insert( 0x100024841424bull, 0x11 ); // Channel HABK
+ titles.insert( 0x1000248414241ull, 0x12 ); // ShopChannel
+ titles.insert( 0x100000002ull, 0x1e6 ); // SystemMenu 4.2K
+ return titles;
+}
-//4.0E
-titles.insert( 0x100000009ull, 0x209 ); // IOS9
-titles.insert( 0x10000000cull, 0xc ); // IOS12
-titles.insert( 0x10000000dull, 0x10 ); // IOS13
-titles.insert( 0x10000000eull, 0x107 ); // IOS14
-titles.insert( 0x10000000full, 0x10a ); // IOS15
-titles.insert( 0x100000010ull, 0x200 ); // IOS16
-titles.insert( 0x100000011ull, 0x206 ); // IOS17
-titles.insert( 0x100000015ull, 0x20d ); // IOS21
-titles.insert( 0x100000016ull, 0x30c ); // IOS22
-titles.insert( 0x10000001cull, 0x50d ); // IOS28
-titles.insert( 0x10000001full, 0xc14 ); // IOS31
-titles.insert( 0x100000021ull, 0xb12 ); // IOS33
-titles.insert( 0x100000022ull, 0xc13 ); // IOS34
-titles.insert( 0x100000023ull, 0xc14 ); // IOS35
-titles.insert( 0x100000024ull, 0xc16 ); // IOS36
-titles.insert( 0x100000025ull, 0xe1c ); // IOS37
-titles.insert( 0x100000026ull, 0xe1a ); // IOS38
-titles.insert( 0x100000032ull, 0x1400 ); // IOS50
-titles.insert( 0x100000033ull, 0x1300 ); // IOS51
-titles.insert( 0x100000035ull, 0x141d ); // IOS53
-titles.insert( 0x100000037ull, 0x141d ); // IOS55
-titles.insert( 0x10000003cull, 0x181e ); // IOS60
-titles.insert( 0x10000003dull, 0x131a ); // IOS61
-titles.insert( 0x1000000feull, 0x3 ); // IOS254
-!!titles.insert( 0x1000248414241ull, 0x10 ); // Channel HABA
-!!titles.insert( 0x1000248415941ull, 0x3 ); // Channel HAYA
-titles.insert( 0x100000002ull, 0x1a2 ); // SystemMenu 4.0E
+QMap< quint64, quint16 > NusDownloader::List43k()
+{
+ QMap< quint64, quint16 > titles = List42k();
+ titles.insert( 0x100000009ull, 0x40a ); // IOS9
+ titles.insert( 0x10000000aull, 0x300 ); // IOS10
+ titles.insert( 0x10000000bull, 0x100 ); // IOS11
+ titles.insert( 0x10000000cull, 0x20e ); // IOS12
+ titles.insert( 0x10000000dull, 0x408 ); // IOS13
+ titles.insert( 0x10000000eull, 0x408 ); // IOS14
+ titles.insert( 0x10000000full, 0x408 ); // IOS15
+ titles.insert( 0x100000011ull, 0x408 ); // IOS17
+ titles.insert( 0x100000014ull, 0x100 ); // IOS20
+ titles.insert( 0x100000015ull, 0x40f ); // IOS21
+ titles.insert( 0x100000016ull, 0x50e ); // IOS22
+ titles.insert( 0x10000001cull, 0x70f ); // IOS28
+ titles.insert( 0x10000001eull, 0xb00 ); // IOS30
+ titles.insert( 0x10000001full, 0xe18 ); // IOS31
+ titles.insert( 0x100000021ull, 0xe18 ); // IOS33
+ titles.insert( 0x100000022ull, 0xe18 ); // IOS34
+ titles.insert( 0x100000023ull, 0xe18 ); // IOS35
+ titles.insert( 0x100000024ull, 0xe18 ); // IOS36
+ titles.insert( 0x100000025ull, 0x161f ); // IOS37
+ titles.insert( 0x100000026ull, 0x101c ); // IOS38
+ titles.insert( 0x100000029ull, 0xe17 ); // IOS41
+ titles.insert( 0x10000002bull, 0xe17 ); // IOS43
+ titles.insert( 0x10000002dull, 0xe17 ); // IOS45
+ titles.insert( 0x10000002eull, 0xe17 ); // IOS46
+ titles.insert( 0x100000030ull, 0x101c ); // IOS48
+ titles.insert( 0x100000032ull, 0x1400 ); // IOS50
+ titles.insert( 0x100000035ull, 0x161f ); // IOS53
+ titles.insert( 0x100000037ull, 0x161f ); // IOS55
+ titles.insert( 0x100000038ull, 0x161e ); // IOS56
+ titles.insert( 0x100000039ull, 0x171f ); // IOS57
+ titles.insert( 0x10000003aull, 0x1820 ); // IOS58
+ titles.insert( 0x10000003dull, 0x161e ); // IOS61
+ titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
+ titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
+ titles.insert( 0x1000000feull, 0xff00 ); // IOS254
+ titles.insert( 0x1000848414b4bull, 0x3 ); // EULA
+ titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
+ titles.insert( 0x100000002ull, 0x206 ); // SystemMenu 4.3K
+ return titles;
+}
-//4.1E
-titles.insert( 0x100000002ull, 0x1c2 ); // SystemMenu 4.1E
-
-//4.2E
-//titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
-titles.insert( 0x100000009ull, 0x30a ); // IOS9
-titles.insert( 0x10000000cull, 0x10d ); // IOS12
-titles.insert( 0x10000000dull, 0x111 ); // IOS13
-titles.insert( 0x10000000eull, 0x208 ); // IOS14
-titles.insert( 0x10000000full, 0x20b ); // IOS15
-titles.insert( 0x100000011ull, 0x307 ); // IOS17
-titles.insert( 0x100000015ull, 0x30e ); // IOS21
-titles.insert( 0x100000016ull, 0x40d ); // IOS22
-titles.insert( 0x10000001cull, 0x60e ); // IOS28
-titles.insert( 0x10000001full, 0xd15 ); // IOS31
-titles.insert( 0x100000021ull, 0xc13 ); // IOS33
-titles.insert( 0x100000022ull, 0xd14 ); // IOS34
-titles.insert( 0x100000023ull, 0xd15 ); // IOS35
-titles.insert( 0x100000024ull, 0xd17 ); // IOS36
-titles.insert( 0x100000025ull, 0xf1d ); // IOS37
-titles.insert( 0x100000026ull, 0xf1b ); // IOS38
-titles.insert( 0x100000035ull, 0x151e ); // IOS53
-titles.insert( 0x100000037ull, 0x151e ); // IOS55
-titles.insert( 0x100000038ull, 0x151d ); // IOS56
-titles.insert( 0x100000039ull, 0x161d ); // IOS57
-titles.insert( 0x10000003cull, 0x1900 ); // IOS60
-titles.insert( 0x10000003dull, 0x151d ); // IOS61
-titles.insert( 0x100000046ull, 0x1a1f ); // IOS70
-titles.insert( 0x1000000deull, 0xff00 ); // IOS222
-titles.insert( 0x1000000dfull, 0xff00 ); // IOS223
-titles.insert( 0x1000000f9ull, 0xff00 ); // IOS249
-titles.insert( 0x1000000faull, 0xff00 ); // IOS250
-titles.insert( 0x1000000feull, 0x104 ); // IOS254
-titles.insert( 0x100000100ull, 0x6 ); // BC
-titles.insert( 0x100000101ull, 0xa ); // MIOS
-titles.insert( 0x1000248414241ull, 0x11 ); // Channel HABA
-titles.insert( 0x1000248414241ull, 0x12 ); // ShopChannel
-titles.insert( 0x100000002ull, 0x1e2 ); // SystemMenu 4.2E
-
-//4.3E
-titles.insert( 0x100000009ull, 0x40a ); // IOS9
-titles.insert( 0x10000000cull, 0x20e ); // IOS12
-titles.insert( 0x10000000dull, 0x408 ); // IOS13
-titles.insert( 0x10000000eull, 0x408 ); // IOS14
-titles.insert( 0x10000000full, 0x408 ); // IOS15
-titles.insert( 0x100000011ull, 0x408 ); // IOS17
-titles.insert( 0x100000015ull, 0x40f ); // IOS21
-titles.insert( 0x100000016ull, 0x50e ); // IOS22
-titles.insert( 0x10000001cull, 0x70f ); // IOS28
-titles.insert( 0x10000001full, 0xe18 ); // IOS31
-titles.insert( 0x100000021ull, 0xe18 ); // IOS33
-titles.insert( 0x100000022ull, 0xe18 ); // IOS34
-titles.insert( 0x100000023ull, 0xe18 ); // IOS35
-titles.insert( 0x100000024ull, 0xe18 ); // IOS36
-titles.insert( 0x100000025ull, 0x161f ); // IOS37
-titles.insert( 0x100000026ull, 0x101c ); // IOS38
-titles.insert( 0x100000028ull, 0xc00 ); // IOS40
-titles.insert( 0x100000029ull, 0xe17 ); // IOS41
-titles.insert( 0x10000002bull, 0xe17 ); // IOS43
-titles.insert( 0x10000002dull, 0xe17 ); // IOS45
-titles.insert( 0x10000002eull, 0xe17 ); // IOS46
-titles.insert( 0x100000030ull, 0x101c ); // IOS48
-titles.insert( 0x100000034ull, 0x1700 ); // IOS52
-titles.insert( 0x100000035ull, 0x161f ); // IOS53
-titles.insert( 0x100000037ull, 0x161f ); // IOS55
-titles.insert( 0x100000038ull, 0x161e ); // IOS56
-titles.insert( 0x100000039ull, 0x171f ); // IOS57
-titles.insert( 0x10000003aull, 0x1820 ); // IOS58
-titles.insert( 0x10000003dull, 0x161e ); // IOS61
-titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
-titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
-titles.insert( 0x1000000feull, 0xff00 ); // IOS254
-titles.insert( 0x1000848414b50ull, 0x3 ); // EULA
-titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
-titles.insert( 0x100000002ull, 0x202 ); // SystemMenu 4.3E
-
-//3.5K
-titles.insert( 0x100000004ull, 0xff00 ); // IOS4
-titles.insert( 0x100000009ull, 0x209 ); // IOS9
-titles.insert( 0x100000015ull, 0x20d ); // IOS21
-titles.insert( 0x100000025ull, 0xe1c ); // IOS37
-titles.insert( 0x100000028ull, 0xc00 ); // IOS40
-titles.insert( 0x100000029ull, 0xb13 ); // IOS41
-titles.insert( 0x10000002bull, 0xb13 ); // IOS43
-titles.insert( 0x10000002dull, 0xb13 ); // IOS45
-titles.insert( 0x10000002eull, 0xb15 ); // IOS46
-titles.insert( 0x100000033ull, 0x1300 ); // IOS51
-titles.insert( 0x100000034ull, 0x161d ); // IOS52
-titles.insert( 0x100000035ull, 0x141d ); // IOS53
-titles.insert( 0x100000037ull, 0x141d ); // IOS55
-titles.insert( 0x10000003dull, 0x131a ); // IOS61
-titles.insert( 0x1000000feull, 0x3 ); // IOS254
-titles.insert( 0x100000100ull, 0x5 ); // BC
-titles.insert( 0x100000101ull, 0x9 ); // MIOS
-titles.insert( 0x100024841424bull, 0x10 ); // Channel HABK
-titles.insert( 0x1000248414c4bull, 0x2 ); // Channel HALK
-titles.insert( 0x100000002ull, 0x186 ); // SystemMenu 3.5K
-
-//4.1K
-titles.insert( 0x100000010ull, 0x200 ); // IOS16
-titles.insert( 0x100000029ull, 0xc13 ); // IOS41
-titles.insert( 0x10000002bull, 0xc13 ); // IOS43
-titles.insert( 0x10000002dull, 0xc13 ); // IOS45
-titles.insert( 0x10000002eull, 0xc15 ); // IOS46
-titles.insert( 0x100000034ull, 0x1700 ); // IOS52
-titles.insert( 0x10000003cull, 0x181e ); // IOS60
-titles.insert( 0x100024841594bull, 0x3 ); // Channel HAYK
-titles.insert( 0x100000002ull, 0x1c6 ); // SystemMenu 4.1K
-
-//4.2K
-//titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
-titles.insert( 0x100000009ull, 0x30a ); // IOS9
-titles.insert( 0x100000015ull, 0x30e ); // IOS21
-titles.insert( 0x100000024ull, 0xd17 ); // IOS36
-titles.insert( 0x100000025ull, 0xf1d ); // IOS37
-titles.insert( 0x100000029ull, 0xd14 ); // IOS41
-titles.insert( 0x10000002bull, 0xd14 ); // IOS43
-titles.insert( 0x10000002dull, 0xd14 ); // IOS45
-titles.insert( 0x10000002eull, 0xd16 ); // IOS46
-titles.insert( 0x100000035ull, 0x151e ); // IOS53
-titles.insert( 0x100000037ull, 0x151e ); // IOS55
-titles.insert( 0x100000038ull, 0x151d ); // IOS56
-titles.insert( 0x100000039ull, 0x161d ); // IOS57
-titles.insert( 0x10000003cull, 0x1900 ); // IOS60
-titles.insert( 0x10000003dull, 0x151d ); // IOS61
-titles.insert( 0x100000046ull, 0x1a1f ); // IOS70
-titles.insert( 0x1000000deull, 0xff00 ); // IOS222
-titles.insert( 0x1000000dfull, 0xff00 ); // IOS223
-titles.insert( 0x1000000f9ull, 0xff00 ); // IOS249
-titles.insert( 0x1000000faull, 0xff00 ); // IOS250
-titles.insert( 0x1000000feull, 0x104 ); // IOS254
-titles.insert( 0x100000100ull, 0x6 ); // BC
-titles.insert( 0x100000101ull, 0xa ); // MIOS
-titles.insert( 0x100024841424bull, 0x11 ); // Channel HABK
-titles.insert( 0x1000248414241ull, 0x12 ); // ShopChannel
-titles.insert( 0x100000002ull, 0x1e6 ); // SystemMenu 4.2K
-
-//4.3K
-titles.insert( 0x100000009ull, 0x40a ); // IOS9
-titles.insert( 0x10000000aull, 0x300 ); // IOS10
-titles.insert( 0x10000000bull, 0x100 ); // IOS11
-titles.insert( 0x10000000cull, 0x20e ); // IOS12
-titles.insert( 0x10000000dull, 0x408 ); // IOS13
-titles.insert( 0x10000000eull, 0x408 ); // IOS14
-titles.insert( 0x10000000full, 0x408 ); // IOS15
-titles.insert( 0x100000011ull, 0x408 ); // IOS17
-titles.insert( 0x100000014ull, 0x100 ); // IOS20
-titles.insert( 0x100000015ull, 0x40f ); // IOS21
-titles.insert( 0x100000016ull, 0x50e ); // IOS22
-titles.insert( 0x10000001cull, 0x70f ); // IOS28
-titles.insert( 0x10000001eull, 0xb00 ); // IOS30
-titles.insert( 0x10000001full, 0xe18 ); // IOS31
-titles.insert( 0x100000021ull, 0xe18 ); // IOS33
-titles.insert( 0x100000022ull, 0xe18 ); // IOS34
-titles.insert( 0x100000023ull, 0xe18 ); // IOS35
-titles.insert( 0x100000024ull, 0xe18 ); // IOS36
-titles.insert( 0x100000025ull, 0x161f ); // IOS37
-titles.insert( 0x100000026ull, 0x101c ); // IOS38
-titles.insert( 0x100000029ull, 0xe17 ); // IOS41
-titles.insert( 0x10000002bull, 0xe17 ); // IOS43
-titles.insert( 0x10000002dull, 0xe17 ); // IOS45
-titles.insert( 0x10000002eull, 0xe17 ); // IOS46
-titles.insert( 0x100000030ull, 0x101c ); // IOS48
-titles.insert( 0x100000032ull, 0x1400 ); // IOS50
-titles.insert( 0x100000035ull, 0x161f ); // IOS53
-titles.insert( 0x100000037ull, 0x161f ); // IOS55
-titles.insert( 0x100000038ull, 0x161e ); // IOS56
-titles.insert( 0x100000039ull, 0x171f ); // IOS57
-titles.insert( 0x10000003aull, 0x1820 ); // IOS58
-titles.insert( 0x10000003dull, 0x161e ); // IOS61
-titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
-titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
-titles.insert( 0x1000000feull, 0xff00 ); // IOS254
-titles.insert( 0x1000848414b4bull, 0x3 ); // EULA
-titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
-titles.insert( 0x100000002ull, 0x206 ); // SystemMenu 4.3K
-
-//3.4J
-titles.insert( 0x100000004ull, 0xff00 ); // IOS4
-titles.insert( 0x100000009ull, 0x208 ); // IOS9
-titles.insert( 0x10000000aull, 0x300 ); // IOS10
-titles.insert( 0x10000000bull, 0x100 ); // IOS11
-titles.insert( 0x10000000cull, 0xb ); // IOS12
-titles.insert( 0x10000000dull, 0xf ); // IOS13
-titles.insert( 0x10000000eull, 0x106 ); // IOS14
-titles.insert( 0x10000000full, 0x109 ); // IOS15
-titles.insert( 0x100000011ull, 0x205 ); // IOS17
-titles.insert( 0x100000014ull, 0x100 ); // IOS20
-titles.insert( 0x100000015ull, 0x20a ); // IOS21
-titles.insert( 0x100000016ull, 0x309 ); // IOS22
-titles.insert( 0x10000001cull, 0x50c ); // IOS28
-titles.insert( 0x10000001eull, 0xb00 ); // IOS30
-titles.insert( 0x10000001full, 0xc10 ); // IOS31
-titles.insert( 0x100000021ull, 0xb10 ); // IOS33
-titles.insert( 0x100000022ull, 0xc0f ); // IOS34
-titles.insert( 0x100000023ull, 0xc10 ); // IOS35
-titles.insert( 0x100000024ull, 0xc12 ); // IOS36
-titles.insert( 0x100000025ull, 0xe19 ); // IOS37
-titles.insert( 0x100000032ull, 0x1319 ); // IOS50
-titles.insert( 0x100000033ull, 0x1219 ); // IOS51
-titles.insert( 0x1000000feull, 0x2 ); // IOS254
-titles.insert( 0x100000002ull, 0x180 ); // SystemMenu 3.4J
-titles.insert( 0x100000100ull, 0x5 ); // BC
-titles.insert( 0x100000101ull, 0x9 ); // MIOS
-titles.insert( 0x1000248414141ull, 0x2 ); // Channel HAAA
-titles.insert( 0x1000248414241ull, 0xd ); // Channel HABA
-titles.insert( 0x1000248414341ull, 0x6 ); // Channel HACA
-titles.insert( 0x100024841464aull, 0x7 ); // Channel HAFJ
-titles.insert( 0x100024841474aull, 0x7 ); // Channel HAGJ
-titles.insert( 0x1000248415941ull, 0x2 ); // Channel HAYA
-titles.insert( 0x1000248414b4aull, 0x2 ); // Channel HAKJ
-titles.insert( 0x1000248414c4aull, 0x2 ); // Channel HALJ
-titles.insert( 0x100084843434aull, 0x0); // Channel HCCJ
-
-//4.0J
-titles.insert( 0x100000009ull, 0x209 ); // IOS9
-titles.insert( 0x10000000cull, 0xc ); // IOS12
-titles.insert( 0x10000000dull, 0x10 ); // IOS13
-titles.insert( 0x10000000eull, 0x107 ); // IOS14
-titles.insert( 0x10000000full, 0x10a ); // IOS15
-titles.insert( 0x100000010ull, 0x200 ); // IOS16
-titles.insert( 0x100000011ull, 0x206 ); // IOS17
-titles.insert( 0x100000015ull, 0x20d ); // IOS21
-titles.insert( 0x100000016ull, 0x30c ); // IOS22
-titles.insert( 0x10000001cull, 0x50d ); // IOS28
-titles.insert( 0x10000001full, 0xc14 ); // IOS31
-titles.insert( 0x100000021ull, 0xb12 ); // IOS33
-titles.insert( 0x100000022ull, 0xc13 ); // IOS34
-titles.insert( 0x100000023ull, 0xc14 ); // IOS35
-titles.insert( 0x100000024ull, 0xc16 ); // IOS36
-titles.insert( 0x100000025ull, 0xe1c ); // IOS37
-titles.insert( 0x100000026ull, 0xe1a ); // IOS38
-titles.insert( 0x100000032ull, 0x1400 ); // IOS50
-titles.insert( 0x100000033ull, 0x1300 ); // IOS51
-titles.insert( 0x100000035ull, 0x141d ); // IOS53
-titles.insert( 0x100000037ull, 0x141d ); // IOS55
-titles.insert( 0x10000003cull, 0x181e ); // IOS60
-titles.insert( 0x10000003dull, 0x131a ); // IOS61
-titles.insert( 0x1000000feull, 0x3 ); // IOS254
-titles.insert( 0x1000248414241ull, 0x10 ); // Channel HABA
-titles.insert( 0x1000248415941ull, 0x3 ); // Channel HAYA
-titles.insert( 0x100024843434aull, 0x1 ); // Channel HCCJ
-titles.insert( 0x100000002ull, 0x1a0 ); // SystemMenu 4.0J
-
-//4.1J
-titles.insert( 0x100000002ull, 0x1c0 ); // SystemMenu 4.1E
-titles.insert( 0x100024843434aull, 0x2 ); // Channel HCCJ
-
-//4.2J
-//titles.insert( 0x100000001ull, 0x4 );//make people really ask for the boot2 update if they want it
-titles.insert( 0x100000009ull, 0x30a ); // IOS9
-titles.insert( 0x10000000cull, 0x10d ); // IOS12
-titles.insert( 0x10000000dull, 0x111 ); // IOS13
-titles.insert( 0x10000000eull, 0x208 ); // IOS14
-titles.insert( 0x10000000full, 0x20b ); // IOS15
-titles.insert( 0x100000011ull, 0x307 ); // IOS17
-titles.insert( 0x100000015ull, 0x30e ); // IOS21
-titles.insert( 0x100000016ull, 0x40d ); // IOS22
-titles.insert( 0x10000001cull, 0x60e ); // IOS28
-titles.insert( 0x10000001full, 0xd15 ); // IOS31
-titles.insert( 0x100000021ull, 0xc13 ); // IOS33
-titles.insert( 0x100000022ull, 0xd14 ); // IOS34
-titles.insert( 0x100000023ull, 0xd15 ); // IOS35
-titles.insert( 0x100000024ull, 0xd17 ); // IOS36
-titles.insert( 0x100000025ull, 0xf1d ); // IOS37
-titles.insert( 0x100000026ull, 0xf1b ); // IOS38
-titles.insert( 0x100000035ull, 0x151e ); // IOS53
-titles.insert( 0x100000037ull, 0x151e ); // IOS55
-titles.insert( 0x100000038ull, 0x151d ); // IOS56
-titles.insert( 0x100000039ull, 0x161d ); // IOS57
-titles.insert( 0x10000003cull, 0x1900 ); // IOS60
-titles.insert( 0x10000003dull, 0x151d ); // IOS61
-titles.insert( 0x100000046ull, 0x1a1f ); // IOS70
-titles.insert( 0x1000000deull, 0xff00 ); // IOS222
-titles.insert( 0x1000000dfull, 0xff00 ); // IOS223
-titles.insert( 0x1000000f9ull, 0xff00 ); // IOS249
-titles.insert( 0x1000000faull, 0xff00 ); // IOS250
-titles.insert( 0x1000000feull, 0x104 ); // IOS254
-titles.insert( 0x100000100ull, 0x6 ); // BC
-titles.insert( 0x100000101ull, 0xa ); // MIOS
-titles.insert( 0x1000248414241ull, 0x11 ); // Channel HABA
-titles.insert( 0x1000248414241ull, 0x12 ); // ShopChannel
-titles.insert( 0x100000002ull, 0x1e0 ); // SystemMenu 4.2J
-
-//4.3J
-titles.insert( 0x100000009ull, 0x40a ); // IOS9
-titles.insert( 0x10000000cull, 0x20e ); // IOS12
-titles.insert( 0x10000000dull, 0x408 ); // IOS13
-titles.insert( 0x10000000eull, 0x408 ); // IOS14
-titles.insert( 0x10000000full, 0x408 ); // IOS15
-titles.insert( 0x100000011ull, 0x408 ); // IOS17
-titles.insert( 0x100000015ull, 0x40f ); // IOS21
-titles.insert( 0x100000016ull, 0x50e ); // IOS22
-titles.insert( 0x10000001cull, 0x70f ); // IOS28
-titles.insert( 0x10000001full, 0xe18 ); // IOS31
-titles.insert( 0x100000021ull, 0xe18 ); // IOS33
-titles.insert( 0x100000022ull, 0xe18 ); // IOS34
-titles.insert( 0x100000023ull, 0xe18 ); // IOS35
-titles.insert( 0x100000024ull, 0xe18 ); // IOS36
-titles.insert( 0x100000025ull, 0x161f ); // IOS37
-titles.insert( 0x100000026ull, 0x101c ); // IOS38
-titles.insert( 0x100000028ull, 0xc00 ); // IOS40
-titles.insert( 0x100000029ull, 0xe17 ); // IOS41
-titles.insert( 0x10000002bull, 0xe17 ); // IOS43
-titles.insert( 0x10000002dull, 0xe17 ); // IOS45
-titles.insert( 0x10000002eull, 0xe17 ); // IOS46
-titles.insert( 0x100000030ull, 0x101c ); // IOS48
-titles.insert( 0x100000034ull, 0x1700 ); // IOS52
-titles.insert( 0x100000035ull, 0x161f ); // IOS53
-titles.insert( 0x100000037ull, 0x161f ); // IOS55
-titles.insert( 0x100000038ull, 0x161e ); // IOS56
-titles.insert( 0x100000039ull, 0x171f ); // IOS57
-titles.insert( 0x10000003aull, 0x1820 ); // IOS58
-titles.insert( 0x10000003dull, 0x161e ); // IOS61
-titles.insert( 0x100000046ull, 0x1b00 ); // IOS70
-titles.insert( 0x100000050ull, 0x1b20 ); // IOS80
-titles.insert( 0x1000000feull, 0xff00 ); // IOS254
-titles.insert( 0x1000848414b4aull, 0x3 ); // EULA
-titles.insert( 0x1000248414241ull, 0x14 ); // ShopChannel
-titles.insert( 0x100000002ull, 0x200 ); // SystemMenu 4.3J
-*/
diff --git a/nand_dump/nusdownloader.h b/nand_dump/nusdownloader.h
index 84df793..e42fcbb 100644
--- a/nand_dump/nusdownloader.h
+++ b/nand_dump/nusdownloader.h
@@ -53,7 +53,7 @@ public:
//TODO! this function is far from complete
//starts getting all the titles involved for a given update
- //expects strings like "4.2u" and "3.3e"
+ //expects strings like "4.2u" and "3.4e" ( any of the updates listed below should be working )
//returns false if it doesnt know the IOS for the given string
// The boot2 update is not uncluded in this. ask for it separately if you want it
bool GetUpdate( const QString & upd, bool decrypt = true );
@@ -63,6 +63,7 @@ public:
//to keep people from bulk DLing and installing and messing something up, any boot2 upudate will not be included
//in the list, ask for it specifically
//lists are created from wiimpersonator logs when available. otherwise they come from examining game update partitions
+ static QMap< quint64, quint16 > List20u();
static QMap< quint64, quint16 > List30u();
static QMap< quint64, quint16 > List31u();
static QMap< quint64, quint16 > List32u();
@@ -73,25 +74,32 @@ public:
static QMap< quint64, quint16 > List42u();
static QMap< quint64, quint16 > List43u();
- /* static QMap< quint64, quint16 > List30e();
+ static QMap< quint64, quint16 > List21e();
+ static QMap< quint64, quint16 > List30e();
static QMap< quint64, quint16 > List31e();
- static QMap< quint64, quint16 > List32e();
- static QMap< quint64, quint16 > List33e();
+ //static QMap< quint64, quint16 > List32e();
+ //static QMap< quint64, quint16 > List33e();
static QMap< quint64, quint16 > List34e();
static QMap< quint64, quint16 > List40e();
static QMap< quint64, quint16 > List41e();
static QMap< quint64, quint16 > List42e();
static QMap< quint64, quint16 > List43e();
- static QMap< quint64, quint16 > List30j();
+ static QMap< quint64, quint16 > List35k();
+ static QMap< quint64, quint16 > List41k();
+ static QMap< quint64, quint16 > List42k();
+ static QMap< quint64, quint16 > List43k();
+
+ static QMap< quint64, quint16 > List20j();
+ //static QMap< quint64, quint16 > List30j();
static QMap< quint64, quint16 > List31j();
- static QMap< quint64, quint16 > List32j();
- static QMap< quint64, quint16 > List33j();
+ //static QMap< quint64, quint16 > List32j();
+ //static QMap< quint64, quint16 > List33j();
static QMap< quint64, quint16 > List34j();
static QMap< quint64, quint16 > List40j();
static QMap< quint64, quint16 > List41j();
static QMap< quint64, quint16 > List42j();
- static QMap< quint64, quint16 > List43j();*/
+ static QMap< quint64, quint16 > List43j();
private:
diff --git a/nand_dump/tiktmd.cpp b/nand_dump/tiktmd.cpp
index 1e58346..96b099a 100644
--- a/nand_dump/tiktmd.cpp
+++ b/nand_dump/tiktmd.cpp
@@ -24,35 +24,53 @@ quint64 Tmd::Tid()
QString Tmd::Cid( quint16 i )
{
- if( p_tmd && i > qFromBigEndian( p_tmd->num_contents ) )
+ if( !p_tmd || i > qFromBigEndian( p_tmd->num_contents ) )
return QString();
return QString( "%1" ).arg( qFromBigEndian( p_tmd->contents[ i ].cid ), 8, 16, QChar( '0' ) );
}
QByteArray Tmd::Hash( quint16 i )
{
- if( p_tmd && i > qFromBigEndian( p_tmd->num_contents ) )
+ if( !p_tmd || i > qFromBigEndian( p_tmd->num_contents ) )
return QByteArray();
return QByteArray( (const char*)&p_tmd->contents[ i ].hash, 20 );
}
+quint16 Tmd::Count()
+{
+ if( !p_tmd )
+ return 0;
+
+ return qFromBigEndian( p_tmd->num_contents );
+}
+
+quint16 Tmd::Version()
+{
+ if( !p_tmd )
+ return 0;
+
+ return qFromBigEndian( p_tmd->title_version );
+}
+
quint64 Tmd::Size( quint16 i )
{
- if( p_tmd && i > qFromBigEndian( p_tmd->num_contents ) )
+ if( !p_tmd || i > qFromBigEndian( p_tmd->num_contents ) )
return 0;
return qFromBigEndian( p_tmd->contents[ i ].size );
}
quint16 Tmd::Type( quint16 i )
{
- if( p_tmd && i > qFromBigEndian( p_tmd->num_contents ) )
+ if( !p_tmd || i > qFromBigEndian( p_tmd->num_contents ) )
return 0;
return qFromBigEndian( p_tmd->contents[ i ].type );
}
quint32 Tmd::SignedSize()
{
+ if( !p_tmd )
+ return 0;
return payLoadOffset + sizeof( tmd ) + ( sizeof( tmd_content ) * qFromBigEndian( p_tmd->num_contents ) );
}
diff --git a/nand_dump/tiktmd.h b/nand_dump/tiktmd.h
index f88a9f9..e659694 100644
--- a/nand_dump/tiktmd.h
+++ b/nand_dump/tiktmd.h
@@ -38,19 +38,7 @@ typedef struct _tiklimit {
quint32 tag;
quint32 value;
} __attribute__((packed)) tiklimit;
-/*
-typedef struct _tikview {
- quint32 view;
- quint64 ticketid;
- quint32 devicetype;
- quint64 titleid;
- quint16 access_mask;
- quint8 reserved[0x3c];
- quint8 cidx_mask[0x40];
- quint16 padding;
- tiklimit limits[8];
-} __attribute__((packed)) tikview;
-*/
+
typedef struct _tik {
sig_issuer issuer;
quint8 fill[63]; //TODO: not really fill
@@ -108,20 +96,6 @@ typedef struct _tmd_view_content
quint64 size;
} __attribute__((packed)) tmd_view_content;
-typedef struct _tmdview
-{
- quint8 version; // 0x0000;
- quint8 filler[3];
- quint64 sys_version; //0x0004
- quint64 title_id; // 0x00c
- quint32 title_type; //0x0014
- quint16 group_id; //0x0018
- quint8 reserved[0x3e]; //0x001a this is the same reserved 0x3e bytes from the tmd
- quint16 title_version; //0x0058
- quint16 num_contents; //0x005a
- tmd_view_content contents[]; //0x005c
-}__attribute__((packed)) tmd_view;
-
typedef struct _cert_header {
sig_issuer issuer;
quint32 cert_type;
@@ -213,6 +187,12 @@ public:
quint16 Type( quint16 i );
quint64 Tid();
+ //gets the number of contents
+ quint16 Count();
+
+ //title version
+ quint16 Version();
+
quint32 SignedSize();
private:
quint32 payLoadOffset;
diff --git a/nand_dump/tools.cpp b/nand_dump/tools.cpp
index 79e6ce4..cb36232 100644
--- a/nand_dump/tools.cpp
+++ b/nand_dump/tools.cpp
@@ -104,6 +104,18 @@ QByteArray AesDecrypt( quint16 index, const QByteArray source )
return ret;
}
+QByteArray AesEncrypt( quint16 index, const QByteArray source )
+{
+ static quint8 iv[ 16 ];
+
+ quint16 beidx = qFromBigEndian( index );
+ memset( iv, 0, 16 );
+ memcpy( iv, &beidx, 2 );
+ QByteArray ret( source.size(), '\0' );
+ aes_encrypt( iv, (const quint8*)source.data(), (quint8*)ret.data(), source.size() );
+ return ret;
+}
+
void AesSetKey( const QByteArray key )
{
aes_set_key( (const quint8*)key.data() );
@@ -129,3 +141,217 @@ QByteArray GetSha1( QByteArray stuff )
//hexdump( ret );
return ret;
}
+
+QByteArray ReadFile( const QString &path )
+{
+ QFile file( path );
+ if( !file.exists() || !file.open( QIODevice::ReadOnly ) )
+ {
+ qWarning() << "ReadFile -> can't open" << path;
+ return QByteArray();
+ }
+ QByteArray ret = file.readAll();
+ file.close();
+ return ret;
+}
+
+#define CERTS_DAT_SIZE 2560
+const quint8 certs_dat[ CERTS_DAT_SIZE ] = {
+0x00, 0x01, 0x00, 0x01, 0x7D, 0x9D, 0x5E, 0xBA, 0x52, 0x81, 0xDC, 0xA7, 0x06, 0x5D, 0x2F, 0x08,
+0x68, 0xDB, 0x8A, 0xC7, 0x3A, 0xCE, 0x7E, 0xA9, 0x91, 0xF1, 0x96, 0x9F, 0xE1, 0xD0, 0xF2, 0xC1,
+0x1F, 0xAE, 0xC0, 0xC3, 0xF0, 0x1A, 0xDC, 0xB4, 0x46, 0xAD, 0xE5, 0xCA, 0x03, 0xB6, 0x25, 0x21,
+0x94, 0x62, 0xC6, 0xE1, 0x41, 0x0D, 0xB9, 0xE6, 0x3F, 0xDE, 0x98, 0xD1, 0xAF, 0x26, 0x3B, 0x4C,
+0xB2, 0x87, 0x84, 0x27, 0x82, 0x72, 0xEF, 0x27, 0x13, 0x4B, 0x87, 0xC2, 0x58, 0xD6, 0x7B, 0x62,
+0xF2, 0xB5, 0xBF, 0x9C, 0xB6, 0xBA, 0x8C, 0x89, 0x19, 0x2E, 0xC5, 0x06, 0x89, 0xAC, 0x74, 0x24,
+0xA0, 0x22, 0x09, 0x40, 0x03, 0xEE, 0x98, 0xA4, 0xBD, 0x2F, 0x01, 0x3B, 0x59, 0x3F, 0xE5, 0x66,
+0x6C, 0xD5, 0xEB, 0x5A, 0xD7, 0xA4, 0x93, 0x10, 0xF3, 0x4E, 0xFB, 0xB4, 0x3D, 0x46, 0xCB, 0xF1,
+0xB5, 0x23, 0xCF, 0x82, 0xF6, 0x8E, 0xB5, 0x6D, 0xB9, 0x04, 0xA7, 0xC2, 0xA8, 0x2B, 0xE1, 0x1D,
+0x78, 0xD3, 0x9B, 0xA2, 0x0D, 0x90, 0xD3, 0x07, 0x42, 0xDB, 0x5E, 0x7A, 0xC1, 0xEF, 0xF2, 0x21,
+0x51, 0x09, 0x62, 0xCF, 0xA9, 0x14, 0xA8, 0x80, 0xDC, 0xF4, 0x17, 0xBA, 0x99, 0x93, 0x0A, 0xEE,
+0x08, 0xB0, 0xB0, 0xE5, 0x1A, 0x3E, 0x9F, 0xAF, 0xCD, 0xC2, 0xD7, 0xE3, 0xCB, 0xA1, 0x2F, 0x3A,
+0xC0, 0x07, 0x90, 0xDE, 0x44, 0x7A, 0xC3, 0xC5, 0x38, 0xA8, 0x67, 0x92, 0x38, 0x07, 0x8B, 0xD4,
+0xC4, 0xB2, 0x45, 0xAC, 0x29, 0x16, 0x88, 0x6D, 0x2A, 0x0E, 0x59, 0x4E, 0xED, 0x5C, 0xC8, 0x35,
+0x69, 0x8B, 0x4D, 0x62, 0x38, 0xDF, 0x05, 0x72, 0x4D, 0xCC, 0xF6, 0x81, 0x80, 0x8A, 0x70, 0x74,
+0x06, 0x59, 0x30, 0xBF, 0xF8, 0x51, 0x41, 0x37, 0xE8, 0x15, 0xFA, 0xBA, 0xA1, 0x72, 0xB8, 0xE0,
+0x69, 0x6C, 0x61, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6F, 0x6F, 0x74, 0x2D, 0x43, 0x41, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x58, 0x53, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x33, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xF1, 0xB8, 0x9F, 0xD1, 0xAD, 0x07, 0xA9, 0x37, 0x8A, 0x7B, 0x10, 0x0C,
+0x7D, 0xC7, 0x39, 0xBE, 0x9E, 0xDD, 0xB7, 0x32, 0x00, 0x89, 0xAB, 0x25, 0xB1, 0xF8, 0x71, 0xAF,
+0x5A, 0xA9, 0xF4, 0x58, 0x9E, 0xD1, 0x83, 0x02, 0x32, 0x8E, 0x81, 0x1A, 0x1F, 0xEF, 0xD0, 0x09,
+0xC8, 0x06, 0x36, 0x43, 0xF8, 0x54, 0xB9, 0xE1, 0x3B, 0xBB, 0x61, 0x3A, 0x7A, 0xCF, 0x87, 0x14,
+0x85, 0x6B, 0xA4, 0x5B, 0xAA, 0xE7, 0xBB, 0xC6, 0x4E, 0xB2, 0xF7, 0x5D, 0x87, 0xEB, 0xF2, 0x67,
+0xED, 0x0F, 0xA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0xF8, 0x43, 0x8D, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0xB3, 0xAD, 0xB3, 0x22, 0x6B, 0x3C, 0x3D, 0xFF, 0x1B, 0x4B, 0x40, 0x77,
+0x16, 0xFF, 0x4F, 0x7A, 0xD7, 0x64, 0x86, 0xC8, 0x95, 0xAC, 0x56, 0x2D, 0x21, 0xF1, 0x06, 0x01,
+0xD4, 0xF6, 0x64, 0x28, 0x19, 0x1C, 0x07, 0x76, 0x8F, 0xDF, 0x1A, 0xE2, 0xCE, 0x7B, 0x27, 0xC9,
+0x0F, 0xBC, 0x0A, 0xD0, 0x31, 0x25, 0x78, 0xEC, 0x07, 0x79, 0xB6, 0x57, 0xD4, 0x37, 0x24, 0x13,
+0xA7, 0xF8, 0x6F, 0x0C, 0x14, 0xC0, 0xEF, 0x6E, 0x09, 0x41, 0xED, 0x2B, 0x05, 0xEC, 0x39, 0x57,
+0x36, 0x07, 0x89, 0x00, 0x4A, 0x87, 0x8D, 0x2E, 0x9D, 0xF8, 0xC7, 0xA5, 0xA9, 0xF8, 0xCA, 0xB3,
+0x11, 0xB1, 0x18, 0x79, 0x57, 0xBB, 0xF8, 0x98, 0xE2, 0xA2, 0x54, 0x02, 0xCF, 0x54, 0x39, 0xCF,
+0x2B, 0xBF, 0xA0, 0xE1, 0xF8, 0x5C, 0x06, 0x6E, 0x83, 0x9A, 0xE0, 0x94, 0xCA, 0x47, 0xE0, 0x15,
+0x58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0xAF, 0x1A, 0xB5, 0xF3, 0xBC, 0x6D,
+0x0A, 0xF1, 0x7D, 0x47, 0x08, 0xE4, 0x43, 0xE9, 0x73, 0xF7, 0xB7, 0x70, 0x77, 0x54, 0xBA, 0xF3,
+0xEC, 0xD2, 0xAC, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6F, 0x6F, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x43, 0x41, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0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 0x49, 0xA0, 0xF7, 0x1F, 0x54, 0x99, 0xF2, 0xD3,
+0x9A, 0xD2, 0x8C, 0x70, 0x05, 0x34, 0x82, 0x93, 0xC4, 0x31, 0xFF, 0xBD, 0x33, 0xF6, 0xBC, 0xA6,
+0x0D, 0xC7, 0x19, 0x5E, 0xA2, 0xBC, 0xC5, 0x6D, 0x20, 0x0B, 0xAF, 0x6D, 0x06, 0xD0, 0x9C, 0x41,
+0xDB, 0x8D, 0xE9, 0xC7, 0x20, 0x15, 0x4C, 0xA4, 0x83, 0x2B, 0x69, 0xC0, 0x8C, 0x69, 0xCD, 0x3B,
+0x07, 0x3A, 0x00, 0x63, 0x60, 0x2F, 0x46, 0x2D, 0x33, 0x80, 0x61, 0xA5, 0xEA, 0x6C, 0x91, 0x5C,
+0xD5, 0x62, 0x35, 0x79, 0xC3, 0xEB, 0x64, 0xCE, 0x44, 0xEF, 0x58, 0x6D, 0x14, 0xBA, 0xAA, 0x88,
+0x34, 0x01, 0x9B, 0x3E, 0xEB, 0xEE, 0xD3, 0x79, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x01, 0x4E, 0x00, 0x5F, 0xF1, 0x3F, 0x86, 0x75, 0x8D, 0xB6, 0x9C, 0x45, 0x63,
+0x0F, 0xD4, 0x9B, 0xF4, 0xCC, 0x5D, 0x54, 0xCF, 0xCC, 0x22, 0x34, 0x72, 0x57, 0xAB, 0xA4, 0xBA,
+0x53, 0xD2, 0xB3,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E, 0x00, 0x73, 0xFA, 0x80, 0x57, 0x6A, 0x14, 0x5E, 0xED,
+0xC4, 0x8B, 0x74, 0x32, 0x87, 0x07, 0x93, 0xC8, 0xFC, 0xA6, 0xD8, 0x3E, 0x09, 0x6E, 0xC5, 0xF2,
+0xA9, 0xC4, 0x21, 0xE7, 0x48, 0xB3, 0x73, 0x40, 0x5B, 0xE2, 0xFA, 0x8A, 0xE1, 0x58, 0x78, 0xE9,
+0xD5, 0x23, 0x88, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x52, 0x6F, 0x6F, 0x74, 0x2D, 0x43, 0x41, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x43, 0x50, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0xF1, 0xB8, 0xA0, 0x64, 0xC1, 0x6D, 0xF3, 0x83, 0x29, 0x55, 0xC3, 0x29,
+0x5B, 0x72, 0xF0, 0x33, 0x2E, 0x97, 0xEF, 0x14, 0x84, 0x8A, 0x68, 0x04, 0x9C, 0xA6, 0x8E, 0xAC,
+0xDE, 0x14, 0x50, 0x33, 0xB8, 0x6C, 0x10, 0x8D, 0x48, 0x33, 0x5C, 0x5D, 0x0C, 0xAB, 0x77, 0x04,
+0x62, 0x54, 0x47, 0x55, 0x45, 0x2A, 0x90, 0x00, 0x70, 0xB1, 0x56, 0x92, 0x5C, 0x17, 0x86, 0xE2,
+0xCD, 0x20, 0x6D, 0xCC, 0xDC, 0x2C, 0x2E, 0x37, 0x6E, 0x27, 0xFC, 0xB4, 0x20, 0x66, 0xCC, 0x0A,
+0x8C, 0xE9, 0xFE, 0xE8, 0x57, 0x04, 0xE6, 0xCA, 0x63, 0x1A, 0x2E, 0x7E, 0x91, 0x7E, 0x94, 0x7C,
+0x39, 0x91, 0x77, 0x36, 0x29, 0xD1, 0x55, 0x61, 0x85, 0xBB, 0xD7, 0xB7, 0x73, 0xCA, 0x37, 0x47,
+0x9E, 0x5F, 0xAA, 0xA3, 0xB6, 0x05, 0xE0, 0x01, 0xE1, 0xAC, 0xE5, 0x8D, 0xD8, 0xF8, 0x47, 0x82,
+0xD6, 0x45, 0xFC, 0xE3, 0xA1, 0xCD, 0x03, 0xAB, 0x36, 0xF0, 0xF3, 0x86, 0xB1, 0xA2, 0xD1, 0x37,
+0x40, 0xA1, 0x94, 0x8A, 0x53, 0xBA, 0x1B, 0x0D, 0x8C, 0x48, 0x63, 0xCD, 0x6B, 0x2C, 0x2E, 0x20,
+0x64, 0x94, 0x80, 0x4C, 0x62, 0xFA, 0xA9, 0x3A, 0x7E, 0x33, 0xA9, 0xEA, 0x78, 0x6B, 0x59, 0xCA,
+0xE3, 0xAB, 0x36, 0x45, 0xF4, 0xCB, 0x8F, 0xD7, 0x90, 0x6B, 0x82, 0x68, 0xCD, 0xAC, 0xF1, 0x7B,
+0x3A, 0xEC, 0x46, 0x83, 0x1B, 0x91, 0xF6, 0xDE, 0x18, 0x61, 0x83, 0xBC, 0x4B, 0x32, 0x67, 0x93,
+0xC7, 0x2E, 0x50, 0xD9, 0x1E, 0x36, 0xA0, 0xDC, 0xE2, 0xB9, 0x7D, 0xA0, 0x21, 0x3E, 0x46, 0x96,
+0x02, 0x1F, 0x33, 0x1C, 0xBE, 0xAE, 0x8D, 0xFC, 0x92, 0x87, 0x32, 0xAA, 0x44, 0xDC, 0x78, 0xE7,
+0x19, 0x9A, 0x3D, 0xDD, 0x57, 0x22, 0x7E, 0x9E, 0x77, 0xDE, 0x32, 0x63, 0x86, 0x93, 0x6C, 0x11,
+0xAC, 0xA7, 0x0F, 0x81, 0x19, 0xD3, 0x3A, 0x99, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+// public root cert
+const quint8 root_dat[] = {
+0xF8, 0x24, 0x6C, 0x58, 0xBA, 0xE7, 0x50, 0x03, 0x01, 0xFB, 0xB7, 0xC2, 0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xC4, 0xC8, 0x58, 0x45, 0x5E, 0xF5, 0xF7, 0xB3, 0x06, 0x44, 0xB4, 0x7C,
+0x64, 0x06, 0x8C, 0xDF, 0x80, 0x9F, 0x76, 0x02, 0x5A, 0x2D, 0xB4, 0x46, 0xE0, 0x3D, 0x7C, 0xF6,
+0x2F, 0x34, 0xE7, 0x02, 0x45, 0x7B, 0x02, 0xA4, 0xCF, 0x5D, 0x9D, 0xD5, 0x3C, 0xA5, 0x3A, 0x7C,
+0xA6, 0x29, 0x78, 0x8C, 0x67, 0xCA, 0x08, 0xBF, 0xEC, 0xCA, 0x43, 0xA9, 0x57, 0xAD, 0x16, 0xC9,
+0x4E, 0x1C, 0xD8, 0x75, 0xCA, 0x10, 0x7D, 0xCE, 0x7E, 0x01, 0x18, 0xF0, 0xDF, 0x6B, 0xFE, 0xE5,
+0x1D, 0xDB, 0xD9, 0x91, 0xC2, 0x6E, 0x60, 0xCD, 0x48, 0x58, 0xAA, 0x59, 0x2C, 0x82, 0x00, 0x75,
+0xF2, 0x9F, 0x52, 0x6C, 0x91, 0x7C, 0x6F, 0xE5, 0x40, 0x3E, 0xA7, 0xD4, 0xA5, 0x0C, 0xEC, 0x3B,
+0x73, 0x84, 0xDE, 0x88, 0x6E, 0x82, 0xD2, 0xEB, 0x4D, 0x4E, 0x42, 0xB5, 0xF2, 0xB1, 0x49, 0xA8,
+0x1E, 0xA7, 0xCE, 0x71, 0x44, 0xDC, 0x29, 0x94, 0xCF, 0xC4, 0x4E, 0x1F, 0x91, 0xCB, 0xD4, 0x95,
+0x00, 0x01, 0x00, 0x01
+};
diff --git a/nand_dump/tools.h b/nand_dump/tools.h
index 34700e6..0796ea0 100644
--- a/nand_dump/tools.h
+++ b/nand_dump/tools.h
@@ -16,12 +16,16 @@ void hexdump12( const QByteArray &d, int from = 0, int len = -1 );
//simplified functions for crypto shit
void AesSetKey( const QByteArray key );
QByteArray AesDecrypt( quint16 index, const QByteArray source );
+QByteArray AesEncrypt( quint16 index, const QByteArray source );
QByteArray GetSha1( QByteArray stuff );
//get a padded version of the given buffer
QByteArray PaddedByteArray( const QByteArray &orig, quint32 padTo );
+//read a file into a bytearray
+QByteArray ReadFile( const QString &path );
+
//keep track of the last folder browsed to when looking for files
extern QString currentDir;
@@ -31,4 +35,8 @@ extern QString cachePath;
//folder to use as the base path for the nand
extern QString nandPath;
+#define CERTS_DAT_SIZE 2560
+extern const quint8 certs_dat[ CERTS_DAT_SIZE ];
+extern const quint8 root_dat[];
+
#endif // TOOLS_H
diff --git a/nand_dump/wad.cpp b/nand_dump/wad.cpp
index 5166840..1334c27 100644
--- a/nand_dump/wad.cpp
+++ b/nand_dump/wad.cpp
@@ -8,7 +8,10 @@ Wad::Wad( const QByteArray stuff )
{
ok = false;
if( stuff.size() < 0x80 )//less than this and there is definitely nothing there
+ {
+ Err( "Size is < 0x80" );
return;
+ }
QByteArray copy = stuff;
QBuffer b( © );
@@ -27,6 +30,7 @@ Wad::Wad( const QByteArray stuff )
if( tmp != 0x49730000 && tmp != 0x69620000 && tmp != 0x426b0000 )
{
b.close();
+ hexdump( stuff, 0, 0x40 );
Err( "Bad file magic word" );
return;
}
@@ -71,11 +75,14 @@ Wad::Wad( const QByteArray stuff )
Ticket ticket( tikData );
Tmd t( tmdData );
+ //hexdump( tikData );
+ //hexdump( tmdData );
+
if( ticket.Tid() != t.Tid() )
qWarning() << "wad contains 2 different TIDs";
- quint32 cnt = qFromBigEndian( t.payload()->num_contents );
- qDebug() << "Wad contains" << hex << cnt << "contents";
+ quint32 cnt = t.Count();
+ //qDebug() << "Wad contains" << hex << cnt << "contents";
//another quick sanity check
quint32 totalSize = 0;
@@ -87,42 +94,395 @@ Wad::Wad( const QByteArray stuff )
Err( "Size of all the apps in the tmd is greater than the size in the wad header" );
return;
}
- /*
-void AesSetKey( const QByteArray key );
-QByteArray AesDecrypt( quint16 index, const QByteArray source );
-*/
//read all the contents, check the hash, and remember the data ( still encrypted )
for( quint32 i = 0; i < cnt; i++ )
{
+
quint32 s = RU( 0x40, t.Size( i ) );
+ //qDebug() << "content" << i << "is at" << hex << pos << "with size" << s;
QByteArray encData = stuff.mid( pos, s );
pos += s;
//doing this here in case there is some other object that is using the AES that would change the key on us
AesSetKey( ticket.DecryptedKey() );
-
+ QByteArray decData = AesDecrypt( i, encData );
+ decData.resize( t.Size( i ) );
+ QByteArray realHash = GetSha1( decData );
+ if( realHash != t.Hash( i ) )
+ {
+ Err( QString( "hash doesnt match for content %1" ).arg( i ) );
+ }
+ partsEnc << encData;
}
-
- //Data = stuff.mid( pos, Size );
- //pos += RU( 0x40, Size );
-
-
-
-
-
-
+ //wtf? some VC titles have a full banner as the footer? maybe somebody's wad packer is busted
+ //QByteArray footer = stuff.mid( pos, stuff.size() - pos );
+ //qDebug() << "footer";
+ //hexdump( footer );
ok = true;
-
}
Wad::Wad( QList< QByteArray > stuff, bool encrypted )
{
+ if( stuff.size() < 3 )
+ {
+ Err( "Cant treate a wad with < 3 items" );
+ return;
+ }
+ tmdData = stuff.at( 0 );
+ tikData = stuff.at( 1 );
+
+ Ticket ticket( tikData );
+ Tmd t( tmdData );
+
+ quint16 cnt = stuff.size() - 2;
+ if( cnt != t.Count() )
+ {
+ Err( "The number of items given doesnt match the number in the tmd" );
+ return;
+ }
+ for( quint16 i = 0; i < cnt; i++ )
+ {
+ QByteArray encData;
+
+ if( encrypted )
+ {
+ encData = stuff.at( i + 2 );
+ }
+ else
+ {
+ QByteArray decDataPadded = PaddedByteArray( stuff.at( i + 2 ), 0x40 );
+ //doing this here in case there is some other object that is using the AES that would change the key on us
+ AesSetKey( ticket.DecryptedKey() );
+ encData = AesEncrypt( i, decDataPadded );
+ }
+ partsEnc << encData;
+ }
+ ok = true;
+
+}
+
+void Wad::SetCert( const QByteArray stuff )
+{
+ certData = stuff;
+}
+
+quint64 Wad::Tid()
+{
+ if( !tmdData.size() )
+ {
+ Err( "There is no data in the TMD" );
+ return 0;
+ }
+ Tmd t( tmdData );
+ return t.Tid();
+}
+
+void Wad::SetGlobalCert( const QByteArray &stuff )
+{
+ globalCert = stuff;
+}
+
+const QByteArray Wad::Content( quint16 i )
+{
+ if( tmdData.isEmpty() || tikData.isEmpty() )
+ {
+ Err( "Can't decryte data without a TMD and ticket" );
+ return QByteArray();
+ }
+ Ticket ticket( tikData );
+ Tmd t( tmdData );
+ if( partsEnc.size() != t.Count() || i >= partsEnc.size() )
+ {
+ Err( "I dont know whats going on some number is out of range and i dont like it" );
+ return QByteArray();
+ }
+ QByteArray encData = partsEnc.at( i );
+
+ AesSetKey( ticket.DecryptedKey() );
+
+ QByteArray decData = AesDecrypt( i, encData );
+ decData.resize( t.Size( i ) );
+ QByteArray realHash = GetSha1( decData );
+ if( realHash != t.Hash( i ) )
+ {
+ Err( QString( "hash doesnt match for content %1" ).arg( i ) );
+ return QByteArray();
+ }
+ return decData;
}
void Wad::Err( QString str )
{
+ ok = false;
errStr = str;
qWarning() << "Wad::Error" << str;
}
+
+const QByteArray Wad::Data( quint32 magicWord, const QByteArray footer )
+{
+ //qDebug() << "Wad::Data" << hex << magicWord << footer.size();
+ if( !partsEnc.size() || tmdData.isEmpty() || tikData.isEmpty() || ( certData.isEmpty() && globalCert.isEmpty() ) )
+ {
+ Err( "Dont have all the parts to make a wad" );
+ return QByteArray();
+ }
+
+ //do some brief checks to make sure that wad is good
+ Ticket ticket( tikData );
+ Tmd t( tmdData );
+ if( t.Tid() != ticket.Tid() )
+ {
+ Err( "Ticket and TMD have different TID" );
+ return QByteArray();
+ }
+ if( partsEnc.size() != t.Count() )
+ {
+ Err( "Dont have enough contents according to the TMD" );
+ return QByteArray();
+ }
+
+ //everything seems in order, try to make the thing
+ QByteArray cert = certData.isEmpty() ? globalCert : certData;
+ quint32 certSize = cert.size();
+ quint32 tikSize = ticket.SignedSize();
+ quint32 tmdSize = t.SignedSize();
+ quint32 appSize = 0;
+ quint32 footerSize = footer.size();
+
+ //add all the app sizes together and check that they match the TMD
+ quint16 cnt = t.Count();
+ for( quint16 i = 0; i < cnt; i++ )
+ {
+ quint32 s = RU( 0x40, partsEnc.at( i ).size() );
+ if( RU( 0x40, t.Size( i ) ) != s )
+ {
+ Err( QString( "Size of content %1 is bad ( %2, %3, %4 )" ).arg( i )
+ .arg( t.Size( i ), 0, 16 )
+ .arg( RU( 0x40, t.Size( i ) ), 0, 16 )
+ .arg( s, 0, 16 ) );
+ return QByteArray();
+ }
+ appSize += s;
+ }
+
+ QByteArray header( 0x20, '\0' );
+ QBuffer buf( &header );
+ buf.open( QIODevice::WriteOnly );
+
+ quint32 tmp = qFromBigEndian( 0x20 );//header size
+ buf.write( (const char*)&tmp, 4 );
+ tmp = qFromBigEndian( magicWord );//magic word
+ buf.write( (const char*)&tmp, 4 );
+ tmp = qFromBigEndian( certSize );
+ buf.write( (const char*)&tmp, 4 );
+ buf.seek( 0x10 );
+ tmp = qFromBigEndian( tikSize );
+ buf.write( (const char*)&tmp, 4 );
+ tmp = qFromBigEndian( tmdSize );
+ buf.write( (const char*)&tmp, 4 );
+ tmp = qFromBigEndian( appSize );
+ buf.write( (const char*)&tmp, 4 );
+ tmp = qFromBigEndian( footerSize );
+ buf.write( (const char*)&tmp, 4 );
+ buf.close();
+ //hexdump( header, 0, 0x20 );
+
+ QByteArray ret = PaddedByteArray( header, 0x40 ) + PaddedByteArray( cert, 0x40 );
+ //make sure we dont have the huge ticket and TMD that come when downloading from NUS
+ QByteArray tik = tikData;
+ tik.resize( tikSize );
+ tik = PaddedByteArray( tik, 0x40 );
+
+ QByteArray tm = tmdData;
+ tm.resize( tmdSize );
+ tm = PaddedByteArray( tm, 0x40 );
+
+ //hexdump( tik );
+ //hexdump( tm );
+
+ ret += tik + tm;
+ for( quint16 i = 0; i < cnt; i++ )
+ {
+ ret += PaddedByteArray( partsEnc.at( i ), 0x40 );
+ }
+ ret += footer;
+ return ret;
+}
+
+QString Wad::WadName( QString path )
+{
+ if( !tmdData.size() )
+ {
+ Err( "There is no data in the TMD" );
+ return QString();
+ }
+ Tmd t( tmdData );
+ return WadName( t.Tid(), t.Version(), path );
+}
+
+QString Wad::WadName( quint64 tid, quint16 version, QString path )
+{
+ quint32 type = (quint32)( ( tid >> 32 ) & 0xffffffff );
+ quint32 base = (quint32)( tid & 0xffffffff );
+ quint8 reg = (quint8)( tid & 0xff );
+ quint32 regionFree = ( ( base >> 8 ) & 0xffffff ) << 8;
+ QString region;
+ switch( reg )
+ {
+ case 0x45:
+ region = "US";
+ break;
+ case 0x50:
+ region = "EU";
+ break;
+ case 0x4A:
+ region = "JP";
+ break;
+ case 0x4B:
+ region = "KO";//is this correct?? i have no korean games
+ break;
+ default:
+ break;
+ }
+ QString name;
+ switch( type )
+ {
+ case 1:
+ switch( base )
+ {
+ case 1:
+ name = QString( "BOOT2-v%1-64" ).arg( version );
+ break;
+ case 2:
+ name = QString( "RVL-WiiSystemmenu-v%1" ).arg( version );
+ break;
+ case 0x100:
+ name = QString( "RVL-bc-v%1" ).arg( version );
+ break;
+ case 0x101:
+ name = QString( "RVL-mios-v%1" ).arg( version );
+ break;
+ default:
+ if( base > 0xff )
+ break;
+ name = QString( "IOS%1-64-v%2" ).arg( base ).arg( version );
+ break;
+ }
+ break;
+ case 0x10002:
+ switch( base )
+ {
+ case 0x48414141://HAAA
+ name = QString( "RVL-photo-v%1" ).arg( version );
+ break;
+ case 0x48415941://HAYA
+ name = QString( "RVL-photo2-v%1" ).arg( version );
+ break;
+ case 0x48414241://HABA
+ name = QString( "RVL-Shopping-v%1" ).arg( version );
+ break;
+ case 0x48414341://HACA
+ name = QString( "RVL-NigaoeNR-v%1" ).arg( version );//mii channel
+ break;
+ case 0x48414741://HAGA
+ name = QString( "RVL-News-v%1" ).arg( version );
+ break;
+ case 0x48414641://HAFA
+ name = QString( "RVL-Weather-v%1" ).arg( version );
+ break;
+ default:
+ switch( regionFree )
+ {
+ case 0x48414600://HAF?
+ name = QString( "RVL-Forecast_%1-v%2" ).arg( region ).arg( version );
+ break;
+ case 0x48414700://HAG?
+ name = QString( "RVL-News_%1-v%2" ).arg( region ).arg( version );
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ break;
+ case 0x10008:
+ switch( regionFree )
+ {
+ case 0x48414b00://HAK?
+ name = QString( "RVL-Eulav_%1-v%2" ).arg( region ).arg( version );
+ break;
+ case 0x48414c00://HAL?
+ name = QString( "RVL-Rgnsel_%1-v%2" ).arg( region ).arg( version );
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ if( name.isEmpty() )
+ return QString();
+
+ if( path.isEmpty() )
+ return name + ".wad.out.wad";
+
+ QString ret = name + ".wad.out.wad";
+ int i = 1;
+ while( QFile::exists( path + "/" + ret ) )
+ {
+ ret = name + QString( "(copy %1)" ).arg( i ) + ".wad.out.wad";
+ i++;
+ }
+ return ret;
+}
+
+QByteArray Wad::FromDirectory( QDir dir )
+{
+ QFileInfoList tmds = dir.entryInfoList( QStringList() << "*.tmd", QDir::Files );
+ if( tmds.isEmpty() )
+ {
+ qWarning() << "Wad::FromDirectory -> no tmd found in" << dir.absolutePath();
+ return QByteArray();
+ }
+ QByteArray tmdD = ReadFile( tmds.at( 0 ).absoluteFilePath() );
+ if( tmdD.isEmpty() )
+ return QByteArray();
+ QFileInfoList tiks = dir.entryInfoList( QStringList() << "*.tik", QDir::Files );
+ if( tiks.isEmpty() )
+ {
+ qWarning() << "Wad::FromDirectory -> no tik found in" << dir.absolutePath();
+ return QByteArray();
+ }
+ QByteArray tikD = ReadFile( tiks.at( 0 ).absoluteFilePath() );
+ if( tikD.isEmpty() )
+ return QByteArray();
+ Tmd t(tmdD );
+ QList datas = QList()<< tmdD << tikD;
+
+ quint16 cnt = t.Count();
+ for( quint16 i = 0; i < cnt; i++ )
+ {
+ QByteArray appD = ReadFile( dir.absoluteFilePath( t.Cid( i ) + ".app" ) );
+ if( appD.isEmpty() )
+ return QByteArray();
+
+ datas << appD;
+ }
+ Wad wad( datas, false );
+ if( !wad.IsOk() )
+ return QByteArray();
+
+ QFileInfoList certs = dir.entryInfoList( QStringList() << "*.cert", QDir::Files );
+ if( !certs.isEmpty() )
+ {
+ QByteArray certD = ReadFile( certs.at( 0 ).absoluteFilePath() );
+ if( !certD.isEmpty() )
+ wad.SetCert( certD );
+ }
+
+ QByteArray ret = wad.Data();
+ return ret;
+}
diff --git a/nand_dump/wad.h b/nand_dump/wad.h
index 55f0069..47a3cb4 100644
--- a/nand_dump/wad.h
+++ b/nand_dump/wad.h
@@ -37,8 +37,7 @@ public:
static void SetGlobalCert( const QByteArray &stuff );
//pack a wad from the given directory
- // use footer to decide if a footer will be added
- static QByteArray FromDirectory( QDir dir, bool footer = false );
+ static QByteArray FromDirectory( QDir dir );
//get a assembled wad from the list of parts
//the first one should be the tmd, the second one the ticket, and the rest are the contents, in order
@@ -46,7 +45,7 @@ public:
static QByteArray FromPartList( QList< QByteArray > stuff, bool isEncrypted = true );
//get all the parts of this wad put together in a wad ready for writing to disc or whatever
- const QByteArray Data();
+ const QByteArray Data( quint32 magicWord = 0x49730000, const QByteArray footer = QByteArray() );
//get the decrypted data from a content
const QByteArray Content( quint16 i );
@@ -54,6 +53,14 @@ public:
//get the last error encountered while trying to do something
const QString LastError(){ return errStr; }
+ //get a name for a wad as it would be seen in a wii disc update partition
+ //if a path is given, it will check that path for existing wads with the name and append a number to the end "(1)" to avoid duplicate files
+ //returns an empty string if it cant guess the title based on TID
+ static QString WadName( quint64 tid, quint16 version, QString path = QString() );
+
+ QString WadName( QString path = QString() );
+
+
private:
bool ok;
QString errStr;