FalsifyTwlBackup:復号前に突っ込んだ鍵の内容を表示するよう修正。

TWLBackupBlock:Release において XML コメント警告無効化忘れ。

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_test_tools@17 6b0af911-cb57-b745-895f-eec5701120e1
This commit is contained in:
n2460 2011-10-18 12:00:42 +00:00
parent afe9cd6daa
commit e2fa5ce3ab
2 changed files with 20 additions and 4 deletions

View File

@ -1090,13 +1090,16 @@ namespace FalsifyTwlBackup
prop.macKeyData[i] = Convert.ToByte(macKeyString[i], 16);
}
// ファイル名の出力 + 鍵データの dump
Console.WriteLine("Twl Backup File : {0}", twlBackupName);
Console.Write("Block Key File : {0}, ", keyName);
dumpArray("", prop.keyData);
Console.Write("MAC Key Data : {0}, ", macKeyData);
dumpArray("", prop.macKeyData);
// バックアップデータを復号化
prop.decryptedBlocks = Utility.DecryptBackupData(twlBackupData, prop.keyData);
Console.WriteLine("Twl Backup Data : {0}", twlBackupName);
Console.WriteLine("Block KeyData : {0}", keyName);
Console.WriteLine("MAC Key Data : {0}", macKeyData);
//==========================================
// 改ざん&ファイル出力
Console.WriteLine("Start ------------");
@ -1106,5 +1109,17 @@ namespace FalsifyTwlBackup
Console.WriteLine("Complete --------");
Console.WriteLine("Output Dir: {0}", prop.outFolderPath);
}
// byte 配列の 16 進表示
static void dumpArray(String msg, byte[] array)
{
Console.Write(msg);
foreach (byte b in array)
{
Console.Write(String.Format("{0,0:X2} ", b));
}
Console.WriteLine();
}
}
}

View File

@ -38,6 +38,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>document.xml</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />