mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-17 06:14:59 +00:00
Descriptions for all!
This commit is contained in:
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class AACSMediaKeyBlock : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "AACS Media Key Block";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Records
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class BDPlusSVM : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "BD+ SVM";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
/// <inheritdoc cref="Models.BDPlus.SVM.Signature"/>
|
||||
|
||||
@@ -7,6 +7,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class BFPK : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "BFPK Archive";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -8,6 +8,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class BSP : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Half-Life Level (BSP)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -7,6 +7,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class CFB : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Compact File Binary";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class CIA : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "CTR Importable Archive (CIA)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -7,6 +7,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class GCF : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Half-Life Game Cache File (GCF)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -7,6 +7,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public partial class InstallShieldCabinet : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "InstallShield Cabinet";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Common Header
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class LinearExecutable : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Linear Executable (LE/LX)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region MS-DOS Stub
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class MSDOS : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "MS-DOS Executable";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -7,6 +7,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public partial class MicrosoftCabinet : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Microsoft Cabinet";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class N3DS : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Nintendo 3DS Cart Image";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class NCF : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Half-Life No Cache File (NCF)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -8,6 +8,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class NewExecutable : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "New Executable (NE)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region MS-DOS Stub
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class Nitro : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Nintendo DS/DSi Cart Image";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Common Header
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class PAK : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Half-Life Package File (PAK)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class PFF : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "NovaLogic Game Archive Format (PFF)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class PlayJAudioFile : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "PlayJ Audio File (PLJ)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Audio Header
|
||||
|
||||
@@ -12,6 +12,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class PortableExecutable : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Portable Executable (PE)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region MS-DOS Stub
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class Quantum : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Quantum Archive";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -9,6 +9,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class SGA : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "SGA";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class VBSP : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Half-Life 2 Level (VBSP)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
/// <inheritdoc cref="Models.VBSP.Header.Signature"/>
|
||||
|
||||
@@ -9,6 +9,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class VPK : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Valve Package File (VPK)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -5,6 +5,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class WAD : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Half-Life Texture Package File (WAD)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -9,6 +9,15 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public abstract class WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <summary>
|
||||
/// Description of the object
|
||||
/// </summary>
|
||||
public abstract string Description { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Instance Variables
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,6 +6,13 @@ namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class XZP : WrapperBase
|
||||
{
|
||||
#region Descriptive Properties
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Description => "Xbox Package File (XZP)";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pass-Through Properties
|
||||
|
||||
#region Header
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
XZ,
|
||||
|
||||
/// <summary>
|
||||
/// xz archive
|
||||
/// Xbox Package File
|
||||
/// </summary>
|
||||
XZP,
|
||||
}
|
||||
|
||||
192
Test/Printer.cs
192
Test/Printer.cs
@@ -2,9 +2,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using BurnOutSharp;
|
||||
using BurnOutSharp.Matching;
|
||||
using BurnOutSharp.Utilities;
|
||||
using BurnOutSharp.Wrappers;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
@@ -63,202 +61,18 @@ namespace Test
|
||||
Console.WriteLine($"File format found: {ft}");
|
||||
|
||||
// Setup the wrapper to print
|
||||
string wrapperName = null;
|
||||
WrapperBase wrapper = null;
|
||||
|
||||
// Assign the correct wrapper
|
||||
switch (ft)
|
||||
{
|
||||
// AACS Media Key Block
|
||||
case SupportedFileType.AACSMediaKeyBlock:
|
||||
wrapperName = "AACS media key block";
|
||||
wrapper = AACSMediaKeyBlock.Create(stream);
|
||||
break;
|
||||
|
||||
// BD+ SVM
|
||||
case SupportedFileType.BDPlusSVM:
|
||||
wrapperName = "BD+ SVM";
|
||||
wrapper = BDPlusSVM.Create(stream);
|
||||
break;
|
||||
|
||||
// BFPK archive
|
||||
case SupportedFileType.BFPK:
|
||||
wrapperName = "BFPK archive";
|
||||
wrapper = BFPK.Create(stream);
|
||||
break;
|
||||
|
||||
// BSP
|
||||
case SupportedFileType.BSP:
|
||||
wrapperName = "BSP";
|
||||
wrapper = BSP.Create(stream);
|
||||
break;
|
||||
|
||||
// CFB
|
||||
case SupportedFileType.CFB:
|
||||
wrapperName = "Compact File Binary";
|
||||
wrapper = CFB.Create(stream);
|
||||
break;
|
||||
|
||||
// CIA
|
||||
case SupportedFileType.CIA:
|
||||
wrapperName = "CIA";
|
||||
wrapper = CIA.Create(stream);
|
||||
break;
|
||||
|
||||
// MS-DOS executable and decendents
|
||||
case SupportedFileType.Executable:
|
||||
wrapperName = "MS-DOS executable";
|
||||
wrapper = MSDOS.Create(stream);
|
||||
if (wrapper != null)
|
||||
{
|
||||
// Check for a valid new executable address
|
||||
if ((wrapper as MSDOS).NewExeHeaderAddr >= stream.Length)
|
||||
break;
|
||||
|
||||
// Try to read the executable info
|
||||
stream.Seek((wrapper as MSDOS).NewExeHeaderAddr, SeekOrigin.Begin);
|
||||
magic = stream.ReadBytes(4);
|
||||
|
||||
// New Executable
|
||||
if (magic.StartsWith(BurnOutSharp.Models.NewExecutable.Constants.SignatureBytes))
|
||||
{
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
wrapperName = "New Executable";
|
||||
wrapper = NewExecutable.Create(stream);
|
||||
}
|
||||
|
||||
// Linear Executable
|
||||
else if (magic.StartsWith(BurnOutSharp.Models.LinearExecutable.Constants.LESignatureBytes)
|
||||
|| magic.StartsWith(BurnOutSharp.Models.LinearExecutable.Constants.LXSignatureBytes))
|
||||
{
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
wrapperName = "Linear Executable";
|
||||
wrapper = LinearExecutable.Create(stream);
|
||||
}
|
||||
|
||||
// Portable Executable
|
||||
else if (magic.StartsWith(BurnOutSharp.Models.PortableExecutable.Constants.SignatureBytes))
|
||||
{
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
wrapperName = "Portable Executable";
|
||||
wrapper = PortableExecutable.Create(stream);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// GCF
|
||||
case SupportedFileType.GCF:
|
||||
wrapperName = "GCF";
|
||||
wrapper = GCF.Create(stream);
|
||||
break;
|
||||
|
||||
// IS-CAB archive
|
||||
case SupportedFileType.InstallShieldCAB:
|
||||
wrapperName = "InstallShield Cabinet";
|
||||
wrapper = InstallShieldCabinet.Create(stream);
|
||||
break;
|
||||
|
||||
// MoPaQ (MPQ) archive
|
||||
case SupportedFileType.MPQ:
|
||||
wrapperName = "MoPaQ archive";
|
||||
//wrapper = MPQ.Create(stream);
|
||||
break;
|
||||
|
||||
// MS-CAB archive
|
||||
case SupportedFileType.MicrosoftCAB:
|
||||
wrapperName = "Microsoft Cabinet";
|
||||
wrapper = MicrosoftCabinet.Create(stream);
|
||||
break;
|
||||
|
||||
// N3DS
|
||||
case SupportedFileType.N3DS:
|
||||
wrapperName = "Nintendo 3DS";
|
||||
wrapper = N3DS.Create(stream);
|
||||
break;
|
||||
|
||||
// NCF
|
||||
case SupportedFileType.NCF:
|
||||
wrapperName = "NCF";
|
||||
wrapper = NCF.Create(stream);
|
||||
break;
|
||||
|
||||
// Nitro
|
||||
case SupportedFileType.Nitro:
|
||||
wrapperName = "Nintendo DS/DSi";
|
||||
wrapper = Nitro.Create(stream);
|
||||
break;
|
||||
|
||||
// PAK
|
||||
case SupportedFileType.PAK:
|
||||
wrapperName = "Nintendo DS/DSi";
|
||||
wrapper = PAK.Create(stream);
|
||||
break;
|
||||
|
||||
// PFF
|
||||
case SupportedFileType.PFF:
|
||||
wrapperName = "NovaLogic Game Archive Format";
|
||||
wrapper = PFF.Create(stream);
|
||||
break;
|
||||
|
||||
// PLJ
|
||||
case SupportedFileType.PLJ:
|
||||
wrapperName = "PlayJ audio file";
|
||||
wrapper = PlayJAudioFile.Create(stream);
|
||||
break;
|
||||
|
||||
// Quantum
|
||||
case SupportedFileType.Quantum:
|
||||
wrapperName = "Quantum archive";
|
||||
wrapper = Quantum.Create(stream);
|
||||
break;
|
||||
|
||||
// SGA
|
||||
case SupportedFileType.SGA:
|
||||
wrapperName = "SGA";
|
||||
wrapper = SGA.Create(stream);
|
||||
break;
|
||||
|
||||
// VBSP
|
||||
case SupportedFileType.VBSP:
|
||||
wrapperName = "VBSP";
|
||||
wrapper = VBSP.Create(stream);
|
||||
break;
|
||||
|
||||
// VPK
|
||||
case SupportedFileType.VPK:
|
||||
wrapperName = "VPK";
|
||||
wrapper = VPK.Create(stream);
|
||||
break;
|
||||
|
||||
// WAD
|
||||
case SupportedFileType.WAD:
|
||||
wrapperName = "Valve WAD";
|
||||
wrapper = WAD.Create(stream);
|
||||
break;
|
||||
|
||||
// XZP
|
||||
case SupportedFileType.XZP:
|
||||
wrapperName = "XZP";
|
||||
wrapper = XZP.Create(stream);
|
||||
break;
|
||||
|
||||
default:
|
||||
Console.WriteLine($"{ft} cannot have information printed yet!");
|
||||
Console.WriteLine();
|
||||
return;
|
||||
}
|
||||
var wrapper = BurnOutSharp.Tools.Utilities.CreateWrapper(ft, stream);
|
||||
|
||||
// If we don't have a wrapper
|
||||
if (wrapper == null)
|
||||
{
|
||||
Console.WriteLine($"Something went wrong parsing {wrapperName}!");
|
||||
Console.WriteLine($"Either {ft} is not supported or something went wrong during parsing!");
|
||||
Console.WriteLine();
|
||||
return;
|
||||
}
|
||||
|
||||
// Print the wrapper name
|
||||
Console.WriteLine($"{wrapperName} wrapper created successfully!");
|
||||
Console.WriteLine($"{wrapper.Description} wrapper created successfully!");
|
||||
|
||||
// Get the base info output name
|
||||
string filenameBase = $"info-{DateTime.Now:yyyy-MM-dd_HHmmss.ffff}";
|
||||
|
||||
Reference in New Issue
Block a user