• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 5 of 5
    1. #1
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1

      Question Project: AdressEditor Elertan

      Silent VPN
      Hello members of guidedhacking!

      I have got a program that's writing values to another program in memory, everything seems fine unless if i write like 80 to the adress i get 128 which is weird, feel free to copy and try it out for yourself (It's going opensource for others too )

      #include "Windows.h"
      #include <iostream>
      #include <string>

      using namespace std; // Created by Elertan!!!

      DWORD ProcessId;
      HWND Window;
      HANDLE hProcess;
      signed int step;
      int TestValue;

      int main();

      void Exit()
      {
      int exit;
      cin >> exit;
      exit;
      }
      void RetrieveWindow()
      {
      LPCSTR WindowN;
      string WindowName;
      cout << "Enter the WindowName of the program: ";
      cin >> WindowName;
      WindowN = WindowName.c_str();


      Window = FindWindow(0,(WindowN));

      if(!Window) { cout << endl << "ERROR 001: Couldn't find the window you are looking for!\n\n" << endl; RetrieveWindow();}
      else {cout << endl << "Attaching to Window succesful." << endl;}

      return;
      }

      void RetrieveProcessId()
      {
      cout << endl << endl << "Gathering ProcessId..." << endl;
      GetWindowThreadProcessId(Window, &ProcessId);
      if(!GetWindowThreadProcessId(Window, &ProcessId)){ cout << "ERROR 002: Error trying to retrieve the ProcessId!"; Exit();}
      cout << "Gathered ProcessId: " << ProcessId << endl << endl;
      return;
      }

      void RetrieveHandle()
      {
      cout << "Creating handle..." << endl;
      hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessId);
      if (!hProcess) { cout << "ERROR 003: Error trying to create a handle!"; Exit();}
      cout << "Handle created succesfully." << endl << endl;
      return;
      }

      void CheckCommand(string com)
      {
      if (com == "help") {cout << "List of commands: 1. Help --- Opens this menu." << endl
      << " 2. cvalue --- Change a value." << endl
      << " More coming soon!" << endl << endl; step = 1; main();}
      if (com == "cvalue")
      {
      DWORD Adress;
      cout << endl << endl << endl << "Change a value based on an adress." << endl
      << "Please enter an adress (0x0 not nessecary): ";
      cin >> hex >> Adress;
      cout << endl << "Checking for valid readable and writable adress (0x" << hex << Adress << ")..." << endl;
      if (!ReadProcessMemory(hProcess,(void *)Adress, &TestValue,sizeof(TestValue), NULL) & (!WriteProcessMemory(hProcess,(void *)Adress,&TestValue,(DWORD)sizeof(TestValue),NULL)))
      {
      cout << "ERROR 004: The adress you entered seems unvalid (UNWRITABLE AND UNREADABLE)!" << endl << endl << endl; step = 1; main();
      }
      if (!ReadProcessMemory(hProcess,(void *)Adress, &TestValue,sizeof(TestValue), NULL)) { cout << "ERROR 005: Adress is unreadable!" << endl << endl << endl; step =1; main();}
      if (!WriteProcessMemory(hProcess,(void *)Adress,&TestValue,(DWORD)sizeof(TestValue),NULL)) { cout << "ERROR 006: Adress is unwritable!" << endl << endl << endl; step=1; main();}

      cout << "Valid adress found!" << endl << endl;
      int NewValue;

      cout << "Please enter a new value!" << endl << "input > ";
      cin >> NewValue;
      cout << endl << endl << "Trying to write value..." << endl;
      WriteProcessMemory(hProcess,(void *)Adress,&NewValue,(DWORD)sizeof(NewValue),NULL);
      cout << "Value written!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" << endl;
      step = 0;
      main();



      }
      }


      int main()
      {
      if (step == 0)
      {
      cout << "AdressEditor 1.0" << endl;
      cout << "Gathering Important information..." << endl
      << "Please answer the following questions." << endl << endl;

      RetrieveWindow();
      RetrieveProcessId();
      RetrieveHandle();

      step = 1;
      }
      if (step == 1)
      {
      string command;
      cout << "Type help for a list of commands." << endl << "input > ";
      cin >> command;
      cout << endl << endl;

      CheckCommand(command);
      }

      return 0;
      }


      Get the adress in cheatengine! And then enter the window name (ex: AssaultCube) use command cvalue (Change Value), enter the adress of where the value is located, and try to write something maybe you have the solution Good Luck and thanks!
      Last edited by Elertan; 02-22-2014 at 07:00 AM. Reason: Removed COPYRIGHTS before Created by elertan :D

    2. #2
      The Angel Of Verdun
      Always More To Code!
       
      Lurking
       
      Nether's Avatar
      Join Date
      Dec 2013
      Location
      England, SW
      Posts
      299
      Thanks (-->)
      54
      Thanks (<--)
      188
      Thats because 80 in hex is 128, Im pretty sure i told you not to use 2x output/input functions with hex inside a local function(scope).

      If you have something like:

      cin >> hex >> address;
      cout << hex << address << endl;

      cin >> value; // could try cin >> dec >> value;
      cout << "value is: " << value << endl; // this will also be hex too, you would be better off using _cprintf, it will fix the issue

      _cprintf("%x", Address);
      _cprintf("%d", Value);


      https://guidedhacking.com/showthread...Source-Code-10 << try learn from my source - although its old you can still learn from it.
      Last edited by Nether; 02-22-2014 at 11:30 AM.
      No Need For Anything Extravagant, Your Blood As A Present Shall Suffice.

    3. #3
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1
      [QUOTE=Nether;21763]Thats because 80 in hex is 128, Im pretty sure i told you not to use 2x output/input functions with hex inside a local function(scope).

      If you have something like:

      cin >> hex >> address;
      cout << hex << address << endl;

      cin >> value;
      cout << "value is: " << value << endl; // this will also be hex too, you would be better off using _cprintf, it will fix the issue

      _cprintf("%x", Address);
      _cprintf("%d", Value);


      Well, I guess that's my bad! I'm not really advanced with coding and trying some stuff out... I'm sorry for making 'stupid mistakes'

      But i'll definitly check your source out and maybe i'll learn something of it! Thanks Anyways

    4. #4
      The Angel Of Verdun
      Always More To Code!
       
      Lurking
       
      Nether's Avatar
      Join Date
      Dec 2013
      Location
      England, SW
      Posts
      299
      Thanks (-->)
      54
      Thanks (<--)
      188
      [QUOTE=EleRtan;21765]
      Quote Originally Posted by Nether View Post
      Thats because 80 in hex is 128, Im pretty sure i told you not to use 2x output/input functions with hex inside a local function(scope).

      If you have something like:

      cin >> hex >> address;
      cout << hex << address << endl;

      cin >> value;
      cout << "value is: " << value << endl; // this will also be hex too, you would be better off using _cprintf, it will fix the issue

      _cprintf("%x", Address);
      _cprintf("%d", Value);


      Well, I guess that's my bad! I'm not really advanced with coding and trying some stuff out... I'm sorry for making 'stupid mistakes'

      But i'll definitly check your source out and maybe i'll learn something of it! Thanks Anyways
      can also try ( cin >> dec >> value; ) also you can use https://guidedhacking.com/showthread...emory-Class-10 my memory class for C++ console/external hacking, this class is outdated a bit but its clean-ish(ill upload new one soon) and commented (also has read me.txt) so its good for learning and also makes your app a lot cleaner if your going to have lots of read/write functions, and don't be sorry for making mistakes - its how we learn, trust me I made exactly the same mistake as you but learnt

      https://www.thenewboston.org/list.php?cat=16 < brilliant for learning basics and some intermediate things
      No Need For Anything Extravagant, Your Blood As A Present Shall Suffice.

    5. #5
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1
      Silent VPN
      [QUOTE=Nether;21766]
      Quote Originally Posted by EleRtan View Post

      can also try ( cin >> dec >> value; ) also you can use https://guidedhacking.com/showthread...emory-Class-10 my memory class for C++ console/external hacking, this class is outdated a bit but its clean-ish(ill upload new one soon) and commented (also has read me.txt) so its good for learning and also makes your app a lot cleaner if your going to have lots of read/write functions, and don't be sorry for making mistakes - its how we learn, trust me I made exactly the same mistake as you but learnt

      https://www.thenewboston.org/list.php?cat=16 < brilliant for learning basics and some intermediate things
      Haha thanks, but i watched all the newboston c++ tutorials already Hey, im tryharding to learn myself some awesome things

    Similar Game Hacker Threads

    1. [VB.NET] Form IN DLL [DLL Project]
      By Devolten in forum Visual Basic
      Replies: 7
      Last Post: 08-27-2016, 09:44 PM
    2. The RRS project
      By d0wen in forum CS:GO Hacks
      Replies: 15
      Last Post: 03-24-2015, 06:20 AM
    3. Aimboss New Project
      By insomniac420 in forum Misc Coding
      Replies: 2
      Last Post: 01-01-2014, 04:18 PM

    Tags for this Thread