Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions ProcessMemoryDataFinder.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OsuMemoryDataProviderTester
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osu!", "osu!", "{FD3B44E6-66B3-4C58-B590-FB11B9CF6FF7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{B3F7447F-5C4F-48B5-B711-D5D9CBF59AAF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{ECAB19BA-FB9B-4264-A353-43839E87C5B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestReader", "TestReader\TestReader.csproj", "{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -39,13 +45,31 @@ Global
{2450525D-627D-4ABA-ACF0-FA1AA76CE4A0}.Release|x64.ActiveCfg = Release|x86
{2450525D-627D-4ABA-ACF0-FA1AA76CE4A0}.Release|x86.ActiveCfg = Release|x86
{2450525D-627D-4ABA-ACF0-FA1AA76CE4A0}.Release|x86.Build.0 = Release|x86
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Debug|x64.ActiveCfg = Debug|x64
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Debug|x64.Build.0 = Debug|x64
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Debug|x86.ActiveCfg = Debug|x86
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Debug|x86.Build.0 = Debug|x86
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Release|x64.ActiveCfg = Release|x64
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Release|x64.Build.0 = Release|x64
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Release|x86.ActiveCfg = Release|x86
{ECAB19BA-FB9B-4264-A353-43839E87C5B5}.Release|x86.Build.0 = Release|x86
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Debug|x64.ActiveCfg = Debug|x64
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Debug|x64.Build.0 = Debug|x64
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Debug|x86.ActiveCfg = Debug|x86
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Debug|x86.Build.0 = Debug|x86
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Release|x64.ActiveCfg = Release|x64
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Release|x64.Build.0 = Release|x64
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Release|x86.ActiveCfg = Release|x86
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D117800F-072D-4AE4-9679-3E2A129A1A3C} = {FD3B44E6-66B3-4C58-B590-FB11B9CF6FF7}
{2450525D-627D-4ABA-ACF0-FA1AA76CE4A0} = {FD3B44E6-66B3-4C58-B590-FB11B9CF6FF7}
{ECAB19BA-FB9B-4264-A353-43839E87C5B5} = {B3F7447F-5C4F-48B5-B711-D5D9CBF59AAF}
{90FD5E98-D0E0-4482-AA2A-5B97F694F5EC} = {B3F7447F-5C4F-48B5-B711-D5D9CBF59AAF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2FBAFFCF-2E42-43DD-B5D2-EFB906701CBF}
Expand Down
6 changes: 6 additions & 0 deletions TestApp/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
126 changes: 126 additions & 0 deletions TestApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
using System;
using System.Collections.Generic;

namespace TestApp
{
internal static class Program
{
internal static string IntArrToString(IEnumerable<int> arr) =>
arr == null ? "NULL" : $"[{string.Join(",", arr)}]";

internal static void Main(string[] args)
{
Console.WriteLine("bruh");

// [[A6ADEB393E0370C0]]-0x20 on 64bit
// [[A6ADEB393E0370C0]]-0x04 on 32bit
// random attempt at creating a Thing with a predictable signature but also making sure that number doesnt show up somewhere else
var thing = new Thing(-4580157255241192026L - 2000);

// supper shitty commandline app that accepts commands to change values
while (true)
{
Console.WriteLine(
$"i: {thing.Int} | s: {thing.String} | a: {IntArrToString(thing.IntArr)} | l: {IntArrToString(thing.IntList)}");
var cmd = Console.ReadLine()?.Trim();
if (cmd == null || cmd.Equals("exit")) break;

if (cmd.StartsWith("ia")) // int add
{
if (int.TryParse(cmd.Substring(2), out var add))
{
Console.WriteLine($"adding {add} to int");
thing.Int += add;
}
else
{
Console.WriteLine("not a valid number");
}
}
else if (cmd.StartsWith("is")) // int subtract
{
if (int.TryParse(cmd.Substring(2), out var add))
{
Console.WriteLine($"subtracting {add} to int");
thing.Int -= add;
}
else
{
Console.WriteLine("not a valid number");
}
}
else if (cmd.StartsWith("ss")) // string set
{
var newString = cmd.Substring(2);
Console.WriteLine("updating string");
thing.String = newString;
}
else if (cmd.StartsWith("an")) // array set null
{
Console.WriteLine("set array to null");
thing.IntArr = null;
}
else if (cmd.StartsWith("ae")) // array set to empty
{
Console.WriteLine("set array to empty");
thing.IntArr = Array.Empty<int>();
}
else if (cmd.StartsWith("aa")) // array append
{
if (thing.IntArr == null)
{
Console.WriteLine("array is null, invalid operation");
}
else
{
if (int.TryParse(cmd.Substring(2), out var add))
{
Console.WriteLine($"appending {add} to array");
var newArr = new int[thing.IntArr.Length + 1];
Array.Copy(thing.IntArr, newArr, thing.IntArr.Length);
newArr[thing.IntArr.Length] = add;
thing.IntArr = newArr;
}
else
{
Console.WriteLine("not a valid number");
}
}
}
else if (cmd.StartsWith("ln")) // list set null
{
Console.WriteLine("set list to null");
thing.IntList = null;
}
else if (cmd.StartsWith("le")) // list set to empty
{
Console.WriteLine("set array to empty");
thing.IntList = new List<int>();
}
else if (cmd.StartsWith("la")) // l append
{
if (thing.IntList == null)
{
Console.WriteLine("list is null, invalid operation");
}
else
{
if (int.TryParse(cmd.Substring(2), out var add))
{
Console.WriteLine($"appending {add} to list");
thing.IntList.Add(add);
}
else
{
Console.WriteLine("not a valid number");
}
}
}
else
{
Console.WriteLine("invalid cmd");
}
}
}
}
}
36 changes: 36 additions & 0 deletions TestApp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PlatformSpecific")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PlatformSpecific")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ce033895-9c7f-4105-ad0b-4ae985848dea")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
98 changes: 98 additions & 0 deletions TestApp/TestApp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{ECAB19BA-FB9B-4264-A353-43839E87C5B5}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>TestApp</RootNamespace>
<AssemblyName>TestApp</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Thing.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
22 changes: 22 additions & 0 deletions TestApp/Thing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Collections.Generic;

namespace TestApp
{
public class Thing
{
public long Pattern { get; set; }
public int Int { get; set; }
public int[] IntArr { get; set; }
public List<int> IntList { get; set; }
public string String { get; set; }

public Thing(long lMin2000)
{
Pattern = lMin2000 + 2000;
Int = 0;
IntArr = null;
IntList = null;
String = "I Am A String";
}
}
}
Loading