Dump decrypted/decompressed content instead of raw

more useful for analysis this way
This commit is contained in:
Kurt
2020-01-13 20:55:58 -08:00
parent 726947eaf5
commit 1ba1597878

View File

@@ -104,7 +104,16 @@ private static void ImportSelectBlock(SCBlock blockTarget)
private static void ExportAllBlocksAsSingleFile(IEnumerable<SCBlock> blocks, string path)
{
var data = SwishCrypto.GetDecryptedRawData(blocks);
using var stream = new MemoryStream();
using var bw = new BinaryWriter(stream);
foreach (var b in blocks)
{
bw.Write(b.Key);
bw.Write((byte)b.Type);
bw.Write((byte)b.SubType);
bw.Write(b.Data);
}
var data = stream.ToArray(); // SwishCrypto.GetDecryptedRawData(blocks); for raw encrypted
File.WriteAllBytes(path, data);
}