private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; RefreshProcs(); if (MapleProcess != null && PinCrackerProcess != null) //both are open { label1.Text = "Both found and injected!"; checkBox1.Enabled = true; System.Threading.Thread.Sleep(10); pReader.ReadProcess = MapleProcess; pReader.OpenProcess(); byte[] dialogValue = pReader.ReadProcessMemory((IntPtr)0x8530B0, 4, out out2); if (BitConverter.ToInt32(dialogValue, 0) == 0) //maple's at a "connection ended" or another dialog { timer2.Enabled = false; ReloadMaple(); timer2.Enabled = true; } } else { label1.Text = "Maple/Cracker not found."; checkBox1.Checked = false; } timer1.Enabled = true; }
public ReadData_from_Mem(uint nProcessID, int _baseAddress, int[] offset) { pmr = new ProcessMemoryReader(); pmr.OpenProcess(nProcessID); baseAddress = pmr.ReadMultiLevelPointer(_baseAddress, 4, offset); }
public void Start() { var memoryReader = new ProcessMemoryReader(); while (true) { foreach (var p in Process.GetProcesses()) { if (!p.ProcessName.Contains("csgo")) { continue; } foreach (ProcessModule m in p.Modules) { if (m.ModuleName.Contains("client.dll")) { Offsets.ClientBaseAddress = (int)m.BaseAddress; } } memoryReader.ReadProcess = p; memoryReader.OpenProcess(); Updater.SendUpdate(Core.GetPlayers(memoryReader)); } Thread.Sleep(10); } }
private void GameChoice_SelectedIndexChanged(object sender, EventArgs e) { try { for (int i = 0; i < MyProcess.Length; i++) { if (GameChoice.SelectedItem.ToString().Contains(MyProcess[i].ProcessName)) { MyProcess[0] = Process.GetProcessById(int.Parse(GameChoice.Text.Replace(MyProcess[i].ProcessName + "-", ""))); mainModule = MyProcess[0].MainModule; Mem.ReadProcess = MyProcess[0]; Mem.OpenProcess(); GameFound = true; MainPlayer.baseAddress = Mem.ReadInt(0x50f4f4); MainPlayer.offsets = new PlayerDataAddr(); SetupEnemyVars(); } } } catch (Exception ex) { MessageBox.Show("Kunne ikke finde klienten, prøv igen: \n " + ex.Message, "Error"); } }
private void frm_AddNpc_Load(object sender, EventArgs e) { System.Diagnostics.Process process = System.Diagnostics.Process.GetProcessById(pId); if (process != null) { khan.ReadProcess = process; khan.OpenProcess(); if (cb.Text != "<New>") { txt_npc_name.Text = dt.Rows[cb.SelectedIndex]["Npc"].ToString(); btn_NPC_Search.Enabled = true; } if (s_dt.Rows.Count > 0) { scan_bar.Value = 100; } else { scan_bar.Maximum = range_per_thread * n_scanner; } _bg_hk.RunWorkerAsync(); } else { this.Hide(); } }
public void Find_Game() { while (true) { Thread.Sleep(3000); if (mReader.FindProcess("ffxiv_dx11")) { Process p = Process.GetProcessesByName("ffxiv_dx11").ToList().FirstOrDefault(); mReader.process = p; mReader.OpenProcess(); Action isrunning = delegate() { GameOn.Text = "游戏已运行"; GameOn.ForeColor = Color.Green; TPBtn.Enabled = true; FindModulePtr(); timer1.Enabled = true; }; Invoke(isrunning); } else { Action notrunning = delegate() { GameOn.Text = "游戏未运行"; GameOn.ForeColor = Color.Red; TPBtn.Enabled = false; GameOn.Enabled = false; timer1.Enabled = false; }; Invoke(notrunning); } } }
// 콤보박스 메뉴중에 어떤 항목을 클릭했을 때 동작할 내용 // 프로세스를 선택했을 때 어떤 행동을 할지 정하는 애 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { try { // 해당 프로세스에 대한 권한을 가져온다 // 프로세스 메모리 읽기/수정 if (comboBox1.SelectedIndex != -1) // 목록을 선택했다면 { string selectedItem = comboBox1.SelectedItem.ToString(); // KakaoTalk-704 int pid = int.Parse(selectedItem.Split('-')[selectedItem.Split('-').Length - 1]); // 문자열을 -로 나눈후 가장 마지막 문자열으르 가져온다. attachProc = Process.GetProcessById(pid); // 프로세스를 열어야함! (권한) mem.ReadProcess = attachProc; // 어떤 프로세스를 열지를 저장 mem.OpenProcess(); // 프로세스를 열기 MessageBox.Show("프로세스 열기 성공! " + attachProc.ProcessName); int base_ptr = attachProc.MainModule.BaseAddress.ToInt32() + 0x00169A38; int player_base = mem.ReadInt(base_ptr); mainPlayer = new PlayerData(player_base); attach = true; } } catch (Exception ex) // 시도했을 때 예외 처리 { attach = false; MessageBox.Show("프로세스 열기 실패: " + ex.Message); } }
private void btnAttach_Click(object sender, EventArgs e) { try { SA = Process.GetProcessesByName("gta_sa"); mainModule = SA[0].MainModule; mem.ReadProcess = SA[0]; mem.OpenProcess(); gameFound = true; offsets.baseAddr = 0xB6F5F0; offsets.health = 0x540; offsets.xPos = new int[] { 0x14, 0x30 }; offsets.zPos = new int[] { 0x14, 0x34 }; offsets.yPos = new int[] { 0x14, 0x38 }; btnAttach.BackColor = Color.Green; //User Feedback btnAttach.Enabled = false; } catch (IndexOutOfRangeException ex) { MessageBox.Show("Game not found!"); //throw ex; } }
private void ReadIDsFromMemory(TorrentClient[] internalClients) { currentRMIns.AddLogLine("Looking for uTorrent 1.6 (build 474) process..."); Process[] processesByName = Process.GetProcessesByName("utorrent"); if (processesByName.Length == 0) { currentRMIns.AddLogLine("No uTorrent process found :("); } else { ProcessMemoryReader pReader = new ProcessMemoryReader(); pReader.ReadProcess = processesByName[0]; currentRMIns.AddLogLine("uTorrent process found! Checking version and data offsets :)"); pReader.OpenProcess(); string str = ""; string prefix = "-UT1600-"; str = this.ReadMemoryIdString(pReader, "utorrent_peerid", prefix, 0x448a38); if (str == "") { currentRMIns.AddLogLine("Incompatible uTorrent version or wrong data offsets :("); } else { internalClients[1].PeerID = "-UT1600-" + this.stringGenerator.urlEncode(str, false); this.ReadMemoryIdString(pReader, "utorrent_key", "", 0x448a34); internalClients[1].Key = this.ReadMemoryIdString(pReader, "utorrent_key", "", 0x448a34); currentRMIns.AddLogLine("Success!!!"); currentRMIns.AddLogLine("Updated " + internalClients[1].Name); currentRMIns.AddLogLine("---> peerID=" + internalClients[1].PeerID); currentRMIns.AddLogLine("---> key=" + internalClients[1].Key); currentRMIns.AddLogLine(""); pReader.CloseHandle(); } } }
public TowerExMain() { InitializeComponent(); if (mReader.FindProcess("ffxiv_dx11")) { Process p = Process.GetProcessesByName("ffxiv_dx11").ToList().FirstOrDefault(); mReader.process = p; mReader.OpenProcess(); Actual_Base_Offset = 0; FindModulePtr(mReader); LoadHookHotkey(); _keyboardHook = new KeyboardHook(); loader = new XmlLoader(); Loadxml(); timer1.Enabled = true; int port = 7410; server = new PicoHttpServer(port); Thread Rx = new Thread(NetworkEvent); Rx.Start(); NetworkStatus.Text = string.Format("正在监听本地端口{0}", port); } else { MessageBox.Show("游戏未运行", "严重错误:上溢", MessageBoxButtons.OK); Environment.Exit(0); } }
private void BtnAttach_Click(object sender, EventArgs e) { try { // Find and Attach to game pro = Process.GetProcessesByName("ac_client"); mem.ReadProcess = pro[0]; mem.OpenProcess(); // Below address holds total players which includes teammates totalPlayers = mem.ReadInt(pro[0].MainModule.BaseAddress.ToInt32() + 0x110D98); // Read game data, begin hacks SetupPlayerAndEnemy(); gameFound = true; btnAttach.BackColor = Color.FromArgb(34, 177, 76); // Green btnAttach.Enabled = false; } catch (IndexOutOfRangeException ex) { MessageBox.Show("Game not found!"); throw ex; } }
// 콤보박스 메뉴 중에 어떤 항목을 클릭했을 때 동작할 내용 // 프로세스를 선택했을 때 어떤 행동을 할지 정하는 애 private void ComboBox1_SelectedIndexChanged(object sender, EventArgs e) { try { // 해당 프로세스에 대한 권한을 가져야한다 if (Combobox1.SelectedIndex != -1) // 목록을 선택했다면 { string selectedItem = Combobox1.SelectedItem.ToString(); int pid = int.Parse(selectedItem.Split('-')[selectedItem.Split('-').Length - 1]); // 문자열을 -로 나눈 후 가장 마지막 문자열을 가져온다, pid는 문자열 근데 안에서 찾는건 string 그래서 int를 string으로 바꿔주기 위해 int.Parse를 쓴다 attachProc = Process.GetProcessById(pid); // 이제 프로세스를 열어야 한다 (권한을 주자) mem.ReadProcess = attachProc; // 프로세스를 연다 mem.OpenProcess(); MessageBox.Show("프로세스 열기 성공 " + attachProc.ProcessName); int base_ptr = attachProc.MainModule.BaseAddress.ToInt32() + 0x00168A28; int player_base = mem.ReadInt(base_ptr); mainPlayer = new Playerdata(player_base); attach = true; } } catch (Exception ex) // 시도했을 때 예외 처리 { attach = false; MessageBox.Show("프로세스 열기 실패" + ex.Message); } }
private void conGame_Click(object sender, EventArgs e) { MyProcess = Process.GetProcesses(); for (int i = 0; i < MyProcess.Length; i++) { if (MyProcess[i].ProcessName == "Terraria") { gameProc = MyProcess[i].ProcessName + "-" + MyProcess[i].Id; gameProcId = MyProcess[i].Id; label2.Text = gameProc; break; } } try { MyProcess[0] = Process.GetProcessById(gameProcId); mainModule = MyProcess[0].MainModule; Mem.ReadProcess = MyProcess[0]; Mem.OpenProcess(); GameFound = true; player.offsets = new PlayerInfo.playerDataAddr(0x308, 0x310, 0x314, 0x318, 0x80); } catch (Exception ex) { MessageBox.Show("Could not connect: " + ex.Message + ex.StackTrace); } }
public Main() { if (!mReader.FindProcess("ffxiv_dx11")) { MessageBox.Show("游戏未运行", "严重错误:上溢", MessageBoxButtons.OK); Environment.Exit(0); } InitializeComponent(); LoadCFG(); Process p = Process.GetProcessesByName("ffxiv_dx11").ToList().FirstOrDefault(); mReader.process = p; mReader.OpenProcess(); Thread F = new Thread(new ThreadStart(FindPtr)); F.Start(); hotbar = new HotbarCollection(); InitTTS(); BlackOutBL = LoadBlackOut(); BLAP.Uninstall(); AppHotKey.UnRegKey(Handle, HKID); uint Modifier = AppHotKey.ModifyKey(Settings.Default.AutoC, Settings.Default.AutoA, Settings.Default.AutoS); uint vK = Simulator.Transcoding(Settings.Default.AutovK); AppHotKey.RegKey(Handle, HKID, Modifier, vK); IntPtr gameptr = FindWindow(null, "最终幻想XIV"); BLAP.Install(gameptr, BLParam.Text, BLvK.Text); }
public void StartUpdate() { if (!Initialized) { Process p = Process.GetProcessesByName("ffxiv_dx11").ToList().FirstOrDefault(); mReader.process = p; mReader.OpenProcess(); pBaseAddress = mReader.process.MainModule.BaseAddress; pStartPoint = pBaseAddress; IntPtr pEndAddress = IntPtr.Add(pBaseAddress, mReader.process.MainModule.ModuleMemorySize); long ModuleSize = (long)pEndAddress - (long)pBaseAddress; ModuleCopy = mReader.ReadByteArray(pStartPoint, (uint)ModuleSize); pMobArray = SearchMobArrayOffset(); Update = new Thread(() => { while (true) { Thread.Sleep(100); if (Initialized) { combatants = GetCombatantList(new IntPtr(((long)pBaseAddress + (long)pMobArray))); } } }); Update.Start(); Initialized = true; } }
private void gameChoiceCB_SelectedIndexChanged(object sender, EventArgs e) { try { for (int i = 0; i < MyProcess.Length; i++) { if (gameChoiceCB.SelectedItem.ToString().Contains(MyProcess[i].ProcessName)) { MyProcess[0] = Process.GetProcessById(int.Parse(gameChoiceCB.Text.Replace(MyProcess[i].ProcessName + "-", ""))); mainModule = MyProcess[0].MainModule; Mem.ReadProcess = MyProcess[0]; Mem.OpenProcess(); GameFound = true; //create our player with the corresponding memory addresses MainPlayer.baseAddress = Mem.ReadInt(0x50f4f4); //GETS US TO THE BEGINNING OF OUR STRUCT MainPlayer.offsets = new PlayerDataAddr(); SetupEnemyVars(); } } } catch (Exception ex) { MessageBox.Show("Could not connect to process " + ex.Message, "Error"); } }
static void Main(string[] args) { Process process = Process.GetProcessesByName("notepad.exe").FirstOrDefault(); ProcessMemoryReader memoryReader = new ProcessMemoryReader(); memoryReader.ReadProcess = process; memoryReader.OpenProcess(); }
private void timer1_Tick(object sender, EventArgs e) { Process process = Process.GetProcessesByName("War3").ToList().FirstOrDefault(); if (process != null) { mreader.ReadProcess = process; mreader.OpenProcess(); offset = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(ViewAddress + (uint)process.Modules[43].BaseAddress), 4, out bytesOut), 0); var offset1 = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(offset + ViewOffset1), 4, out bytesOut), 0); var offset2 = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)(offset1 + ViewOffset2), 4, out bytesOut), 0); var wtf = offset2 + ViewOffset3; var ViewNum = BitConverter.ToSingle(mreader.ReadMemory((IntPtr)wtf, 4, out bytesOut), 0); byte[] bytesOfTheNumber = BitConverter.GetBytes(ViewNum); textBox1.Text = ViewNum.ToString(""); } }
public void FindPtr() { Process process = Process.GetProcessesByName("ffxiv_dx11").ToList().FirstOrDefault(); mReader.process = process; mReader.OpenProcess(); BaseOffset = (long)mReader.ScanPtrBySig("48833D********007411488B0D********4885C97405E8********488D0D")[0]; pModule = mReader.ReadInt64((IntPtr)((long)process.Modules[0].BaseAddress + BaseOffset)); }
private void btnReadMemory_Click(object sender, EventArgs e) { localPlayer = pBaseAddress + pOffsetLocalPlayer; Process p = Process.GetProcessesByName("ac_client").ToList().FirstOrDefault(); if (p != null) { mReader.ReadProcess = p; lblProcessId.Text = String.Format("Process ID: {0:G}", p.Id); mReader.OpenProcess(); // Ammo Reading ammooffset = BitConverter.ToUInt32(mReader.ReadMemory((IntPtr)(pBaseAddress + pOffsetLocalPlayer), 4, out bytesOut), 0); if (pAmmoOffset < 0) { ammooffset -= (uint)Math.Abs(pAmmoOffset); } else { ammooffset += (uint)pAmmoOffset; } // Health Reading healthoffset = BitConverter.ToUInt32(mReader.ReadMemory((IntPtr)(pBaseAddress + pOffsetLocalPlayer), 4, out bytesOut), 0); if (pHealthOffset < 0) { healthoffset -= (uint)Math.Abs(pHealthOffset); } else { healthoffset += (uint)pHealthOffset; } // X Pos Reading gameSpeedOffset = BitConverter.ToUInt32(mReader.ReadMemory((IntPtr)(pBaseAddress + pGameSpeedOffset), 4, out bytesOut), 0); if (pGameSpeedOffset < 0) { gameSpeedOffset -= (uint)Math.Abs(pGameSpeedOffset); } else { gameSpeedOffset += (uint)pGameSpeedOffset; } btnReadMemory.Enabled = false; btnReadMemory.Text = "Attached!"; btnMaxAmmo.Enabled = true; btnMaxHealth.Enabled = true; } else if (p == null) { lblProcessId.Text = "Process not found! Is it running?"; } }
static void Main(string[] args) { ProcessMemoryReader pReader = GetLithtechProcess(); if (pReader != null) { pReader.OpenProcess(); Console.WriteLine("Executable Name: " + pReader.GetProcessName() + " Base Addr: " + pReader.GetBaseAddress().ToString("X")); ProcessModule temp = pReader.GetModule("object.lto"); if (temp != null) { int bytesRead = 0; byte[] buffer = new byte[4]; buffer = pReader.ReadProcessMemory(temp.BaseAddress, (uint)buffer.Length, out bytesRead); //Get our modules correct offset IntPtr finalOffset = temp.BaseAddress - pReader.GetBaseAddress(); //Add our static offset IntPtr newOffset = (IntPtr)pReader.GetBaseAddress() + (int)finalOffset + 0x92128; //Setup our multi level pointer int[] offsetList = { 0x58c }; //Use our multi level pointer to get the correct pointer address int finalPtrAddr = pReader.GetPointerAddress(newOffset, offsetList); Console.WriteLine(String.Format("Final Offset Pointer Address: {0}", finalPtrAddr.ToString("x"))); while (true) { //check if we lost our object.lto and regain control if (temp != null) { //Get our level name string levelName = pReader.ReadProcessMemoryString((IntPtr)finalPtrAddr, 64, out bytesRead); Console.WriteLine(String.Format("Level loaded: {0}", levelName)); System.Threading.Thread.Sleep(200); Console.CursorTop--; Console.CursorVisible = false; } else { //We lost it, so try and get it again temp = pReader.GetModule("object.lto"); } } } } Console.ReadLine(); }
public SignatureScanner() { Process p = Process.GetProcessesByName("ffxiv_dx11").ToList().FirstOrDefault(); mReader.process = p; mReader.OpenProcess(); pBaseAddress = mReader.process.MainModule.BaseAddress; pEndAddress = IntPtr.Add(pBaseAddress, mReader.process.MainModule.ModuleMemorySize); pStartPoint = pBaseAddress; ModuleSize = (long)pEndAddress - (long)pBaseAddress; ModuleCopy = new byte[ModuleSize]; }
private void Run() { bool isStopped = false; ProcessMemoryReader reader = new ProcessMemoryReader(); reader.ReadProcess = mainProcess; UInt64 readSize = 4 * 4 * 4; byte[] readBuffer = new byte[readSize]; reader.OpenProcess(); Mutex mutex = new Mutex(false, "Dirt5MatrixProviderMutex"); using (MemoryMappedFile mmf = MemoryMappedFile.CreateNew("Dirt5MatrixProvider", 10000)) { while (!isStopped) { try { Int64 byteReadSize; reader.ReadProcessMemory((IntPtr)memoryAddress, readSize, out byteReadSize, readBuffer); if (byteReadSize == 0) { continue; } float[] floats = new float[4 * 4]; Buffer.BlockCopy(readBuffer, 0, floats, 0, readBuffer.Length); SetRichTextBoxThreadSafe(matrixBox, "" + floats[0] + " " + floats[1] + " " + floats[2] + " " + floats[3] + "\n" + floats[4] + " " + floats[5] + " " + floats[6] + " " + floats[7] + "\n" + floats[8] + " " + floats[9] + " " + floats[10] + " " + floats[11] + "\n" + floats[12] + " " + floats[13] + " " + floats[14] + " " + floats[15]); mutex.WaitOne(); using (MemoryMappedViewStream stream = mmf.CreateViewStream()) { BinaryWriter writer = new BinaryWriter(stream); writer.Write(readBuffer); } mutex.ReleaseMutex(); Thread.Sleep(1000 / 100); } catch (Exception e) { Thread.Sleep(1000); } } } }
private void frmItemStat_Load(object sender, EventArgs e) { System.Diagnostics.Process process = System.Diagnostics.Process.GetProcessById(pId); if (process != null) { khan.ReadProcess = process; khan.OpenProcess(); } if (!bg_hk.IsBusy) { bg_hk.RunWorkerAsync(); } }
/// <summary> /// Read to the address location. /// </summary> /// <param name="array">address + offset</param> /// <param name="var">result</param> public static bool Read(uint[] array, bool var) { Process process = Process.GetProcessesByName("iw3mp").ToList().FirstOrDefault(); uint Base_Address = array[0]; uint Offset = array[1]; uint Value = Convert.ToUInt32(var); if (process != null) { mreader.ReadProcess = process; mreader.OpenProcess(); uint Target = Base_Address + Offset; uint val = BitConverter.ToUInt32(mreader.ReadMemory((IntPtr)Target, sizeof(uint), out NULL), 0); bool ret = Convert.ToBoolean(val); return(ret); } return(false); }
private void start_monitor_btn_Click(object sender, EventArgs e) { while (MyProcess.Length == 0) { // Wait for game to start Process[] MyProcess = Process.GetProcessesByName("ac_client"); } mainModule = MyProcess[0].MainModule; Mem.ReadProcess = MyProcess[0]; Mem.OpenProcess(); ProcessFound = true; monitor_tmr.Start(); statusBox.BackColor = System.Drawing.Color.Green; }
private void button2_Click(object sender, EventArgs e) { var procs = Process.GetProcesses(); var ms = procs.FirstOrDefault(p => p.ProcessName == "MineSweeper"); reader = new ProcessMemoryReader() { ReadProcess = ms }; reader.OpenProcess(); int read = -1; data2 = reader.ReadProcessMemory((IntPtr)0x10000, 57344, out read); }
private void startButton_Click(object sender, EventArgs e) { if (MyProcess.Length == 0) { MessageBox.Show("Make sure game is running"); System.Windows.Forms.Application.Exit(); } else { mainModule = MyProcess[0].MainModule; Mem.ReadProcess = MyProcess[0]; Mem.OpenProcess(); ProcessFound = true; } }
private int ReadMemoryAddress(int offset, uint bytelength) { int bytesReadSize; ProcessMemoryReader reader = new ProcessMemoryReader(); reader.ReadProcess = FF8Process; reader.OpenProcess(); IntPtr readAddress = IntPtr.Add(GameBaseAddress, offset); byte[] mem = reader.ReadProcessMemory(readAddress, bytelength, out bytesReadSize); int i = ByteToInt(mem, bytesReadSize); return(i); }
static void GetValues(Object o) { Dictionary <int, Dictionary <int, string> > values = new Dictionary <int, Dictionary <int, string> >(); ProcessMemoryReader reader = new ProcessMemoryReader(); Process[] MyProcess = Process.GetProcessesByName("FF8_EN"); ProcessModule mainModule; IntPtr ProcessBaseAddress; try { mainModule = MyProcess[0].MainModule; ProcessBaseAddress = mainModule.BaseAddress; reader.ReadProcess = MyProcess[0]; reader.OpenProcess(); //Console.WriteLine("Found Process"); var a = new FFVIIIMemoryAddresses(ProcessBaseAddress, ref reader); Dictionary <string, int> gamestate = a.GetGameState(); if (gamestate["InTriad"] == 1) //Playing Triple Triad { a.GetCardGameValues(); } else if (gamestate["InBattle"] == 1) //In Fight { a.GetBattleValues(); } else //In field { a.GetFieldValues(); } } catch (Exception e) { Console.WriteLine("Waiting for FF8 to start.", "Error: 120"); Console.WriteLine(e.Message); Console.WriteLine(); Console.ReadLine(); } }