Skip to content

Instantly share code, notes, and snippets.

@paulohenriquesn
Created February 14, 2018 00:41
Show Gist options
  • Save paulohenriquesn/76a31426afde2b2d630e7df4a563df01 to your computer and use it in GitHub Desktop.
Save paulohenriquesn/76a31426afde2b2d630e7df4a563df01 to your computer and use it in GitHub Desktop.
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MiceFunc
{
public partial class AobInjection : Form
{
public AobInjection()
{
InitializeComponent();
}
private void AobInjection_Load(object sender, EventArgs e)
{
CenterToScreen();
}
private void button_Inject_Click(object sender, EventArgs e)
{
DotNetScanMemory_SmoLL scan = new DotNetScanMemory_SmoLL();
List<string> Aobs = new List<string>();
List<string> Trocas = new List<string>();
List<IntPtr[]> AobsInject = new List<IntPtr[]> ();
using (StreamReader sr = new StreamReader(formGame.configuration.AobFileLocation))
{
var Json = sr.ReadToEnd();
JObject jsonObject = JObject.Parse(Json);
for (int i = 1; i < int.Parse(jsonObject["countAobs"].ToString())+1; i++)
{
Aobs.Add(jsonObject[$"{i}"].ToString());
}
for(int i = 0; i < Aobs.Count; i++)
{
string[] split = Aobs[i].Split(',');
AobsInject.Add(scan.ScanArray(scan.GetPID("Transformice.exe"), split[0]));
Trocas.Add(split[1]);
// MessageBox.Show($"[AOB] {split[0]}\n[TROCA] {split[1]}");
}
for(int a = 0; a < AobsInject.Count; a++)
{
scan.WriteArray(AobsInject[a][0], Trocas[a]);
MessageBox.Show(AobsInject[a][0] + " Troca: " + Trocas[a]);
}
MessageBox.Show("Injected");
this.Close();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment