Add skeletons for other executable types

This commit is contained in:
Matt Nadareski
2022-11-05 23:36:15 -07:00
parent ffeb73ab7c
commit b7fb17a79f
4 changed files with 123 additions and 3 deletions

View File

@@ -0,0 +1,40 @@
using System.IO;
using BurnOutSharp.Models.LinearExecutable;
namespace BurnOutSharp.Builder
{
// TODO: Make Stream Data rely on Byte Data
public static class LinearExecutable
{
#region Byte Data
/// <summary>
/// Parse a byte array into a Linear Executable
/// </summary>
/// <param name="data">Byte array to parse</param>
/// <param name="offset">Offset into the byte array</param>
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(byte[] data, int offset)
{
// TODO: Implement LE/LX parsing
return null;
}
#endregion
#region Stream Data
/// <summary>
/// Parse a Stream into a Linear Executable
/// </summary>
/// <param name="data">Stream to parse</param>
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(Stream data)
{
// TODO: Implement LE/LX parsing
return null;
}
#endregion
}
}

View File

@@ -160,7 +160,7 @@ namespace BurnOutSharp.Builder
#region Stream Data
/// <summary>
/// Parse a byte array into an MS-DOS executable
/// Parse a Stream into an MS-DOS executable
/// </summary>
/// <param name="data">Stream to parse</param>
/// <returns>Filled executable on success, null on error</returns>
@@ -207,7 +207,7 @@ namespace BurnOutSharp.Builder
}
/// <summary>
/// Parse a byte array into an MS-DOS executable header
/// Parse a Stream into an MS-DOS executable header
/// </summary>
/// <param name="data">Stream to parse</param>
/// <returns>Filled executable header on success, null on error</returns>
@@ -276,7 +276,7 @@ namespace BurnOutSharp.Builder
}
/// <summary>
/// Parse a byte array into a relocation table
/// Parse a Stream into a relocation table
/// </summary>
/// <param name="data">Stream to parse</param>
/// <returns>Filled executable header on success, null on error</returns>

View File

@@ -0,0 +1,40 @@
using System.IO;
using BurnOutSharp.Models.NewExecutable;
namespace BurnOutSharp.Builder
{
// TODO: Make Stream Data rely on Byte Data
public static class NewExecutable
{
#region Byte Data
/// <summary>
/// Parse a byte array into a New Executable
/// </summary>
/// <param name="data">Byte array to parse</param>
/// <param name="offset">Offset into the byte array</param>
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(byte[] data, int offset)
{
// TODO: Implement NE parsing
return null;
}
#endregion
#region Stream Data
/// <summary>
/// Parse a Stream into a New Executable
/// </summary>
/// <param name="data">Stream to parse</param>
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(Stream data)
{
// TODO: Implement NE parsing
return null;
}
#endregion
}
}

View File

@@ -0,0 +1,40 @@
using System.IO;
using BurnOutSharp.Models.PortableExecutable;
namespace BurnOutSharp.Builder
{
// TODO: Make Stream Data rely on Byte Data
public static class PortableExecutable
{
#region Byte Data
/// <summary>
/// Parse a byte array into a Portable Executable
/// </summary>
/// <param name="data">Byte array to parse</param>
/// <param name="offset">Offset into the byte array</param>
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(byte[] data, int offset)
{
// TODO: Implement PE parsing
return null;
}
#endregion
#region Stream Data
/// <summary>
/// Parse a Stream into a Portable Executable
/// </summary>
/// <param name="data">Stream to parse</param>
/// <returns>Filled executable on success, null on error</returns>
public static Executable ParseExecutable(Stream data)
{
// TODO: Implement PE parsing
return null;
}
#endregion
}
}