Skip to content

Commit

Permalink
Reuse common package for popular derivations
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed May 26, 2024
1 parent 26467e6 commit a8b3f1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 73 deletions.
68 changes: 0 additions & 68 deletions implement/read-memory-64-bit/CommonConversion.cs

This file was deleted.

9 changes: 4 additions & 5 deletions implement/read-memory-64-bit/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int Main(string[] args)
Console.WriteLine("Completed collecting the sample.");
var processSampleId = Pine.CommonConversion.StringBase16FromByteArray(
var processSampleId = Pine.CommonConversion.StringBase16(
Pine.CommonConversion.HashSHA256(processSampleFile));
var fileName = "process-sample-" + processSampleId[..10] + ".zip";
Expand Down Expand Up @@ -97,7 +97,7 @@ static int Main(string[] args)
(IMemoryReader, IImmutableList<ulong>) GetMemoryReaderAndRootAddressesFromProcessSampleFile(byte[] processSampleFile)
{
var processSampleId = Pine.CommonConversion.StringBase16FromByteArray(
var processSampleId = Pine.CommonConversion.StringBase16(
Pine.CommonConversion.HashSHA256(processSampleFile));
Console.WriteLine($"Reading from process sample {processSampleId}.");
Expand Down Expand Up @@ -126,7 +126,7 @@ static int Main(string[] args)
(IMemoryReader, IImmutableList<ulong>) GetMemoryReaderAndWithSpecifiedRootFromProcessSampleFile(byte[] processSampleFile, ulong rootAddress)
{
var processSampleId = Pine.CommonConversion.StringBase16FromByteArray(
var processSampleId = Pine.CommonConversion.StringBase16(
Pine.CommonConversion.HashSHA256(processSampleFile));
Console.WriteLine($"Reading from process sample {processSampleId}.");
Expand Down Expand Up @@ -233,8 +233,7 @@ IImmutableList<UITreeNode> ReadUITrees() =>
var fileContent = System.Text.Encoding.UTF8.GetBytes(uiTreeAsJson);
var sampleId = Pine.CommonConversion.StringBase16FromByteArray(
Pine.CommonConversion.HashSHA256(fileContent));
var sampleId = Pine.CommonConversion.StringBase16(Pine.CommonConversion.HashSHA256(fileContent));
var outputFilePath = outputFileArgument;
Expand Down
1 change: 1 addition & 0 deletions implement/read-memory-64-bit/read-memory-64-bit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="Pine" Version="0.3.5" />
<PackageReference Include="System.Drawing.Common" Version="8.0.5" />
</ItemGroup>

Expand Down

0 comments on commit a8b3f1f

Please sign in to comment.