• 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
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 17
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uixhc94's Avatar
      Join Date
      Nov 2012
      Posts
      12
      Thanks (-->)
      1
      Thanks (<--)
      0

      How to inject dll located same directory

      Silent VPN
      i saw this tutorial video. : C++ HOW TO HACK any game TUTORIAL [Trainer & DLL Injection] DIFFICULTY [2/10]

      now i want to change dll directory from C:\\HACKS\\ to current one. i revised code but seems dont work.

      char dllPath[250]="c:\\HACKS\\"; ----> char dllPath[250]; GetCurrentDirectory(MAX_PATH,dllpath) ;

      yes, im a noob and not a native english speaker...anyone help me...

    2. #2
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uixhc94's Avatar
      Join Date
      Nov 2012
      Posts
      12
      Thanks (-->)
      1
      Thanks (<--)
      0
      is there anyway to write relative path? example : ../folderA/B/

    3. #3
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      If you don't have a path, it will search for the file from the directory .exe is located at. But I don't know how does this fit into Fleeps code, you'd have to probably alter a line or two
      How to inject dll located same directory

    4. #4
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uixhc94's Avatar
      Join Date
      Nov 2012
      Posts
      12
      Thanks (-->)
      1
      Thanks (<--)
      0
      SOURCE CODE:

      #include<iostream>
      #include<Windows.h>
      #include<TlHelp32.h>

      using namespace std;
      bool InjectDLL(DWORD ProcessID);

      char FileToInject[] = "ACubeDll.dll";
      char ProcessName[] ="ac_client.exe";
      typedef HINSTANCE (*fpLoadLibrary)(char*);

      int main()
      {




      DWORD processId = NULL;
      PROCESSENTRY32 pe32 = {sizeof(PROCESSENTRY32)};
      HANDLE hProcSnap;

      while(!processId)
      {


      system("CLS");
      cout << "Searching for " <<ProcessName<< "..." <<endl;
      cout << "Make sure your game is running" <<endl;
      hProcSnap =CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);

      if(Process32First(hProcSnap,&pe32))
      {
      do
      {
      if(!strcmp(pe32.szExeFile,ProcessName))
      {
      processId=pe32.th32ProcessID;
      break;
      }
      }


      while(Process32Next(hProcSnap,&pe32));

      }

      Sleep(1000);
      }



      while(!InjectDLL(processId))
      {

      system("CLS");
      cout << "Dll failed to inject"<<endl;
      Sleep(1000);
      }

      cout << "DLL Injected successfuly!" << endl <<endl;
      cout << "Closing Injector in 5 secs." <<endl;

      CloseHandle(hProcSnap);
      Sleep(5000);

      return 0;
      }


      bool InjectDLL(DWORD ProcessID)
      {


      HANDLE hProc;
      LPVOID paramAddr;

      HINSTANCE hDLL =LoadLibrary("KERNEL32");

      fpLoadLibrary LoadLibraryAddr =(fpLoadLibrary)GetProcAddress(hDLL,"LoadLibraryA" );


      hProc =OpenProcess (PROCESS_ALL_ACCESS, false , ProcessID);

      char dllPath[250]="c:\\HACKS\\";




      strcat(dllPath , FileToInject);

      paramAddr = VirtualAllocEx(hProc , 0,strlen(dllPath)+1,MEM_COMMIT,PAGE_READWRITE);

      bool memorywritten = WriteProcessMemory(hProc,paramAddr,dllPath,strlen( dllPath)+1,NULL);

      CreateRemoteThread(hProc , 0,0,(LPTHREAD_START_ROUTINE)LoadLibraryAddr,paramA ddr,0,0);

      CloseHandle(hProc);
      return memorywritten;




      }

    5. #5
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uixhc94's Avatar
      Join Date
      Nov 2012
      Posts
      12
      Thanks (-->)
      1
      Thanks (<--)
      0
      how can i modify this code to load dll which located at same directory....

    6. #6
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      For relative folder, change
      Code:
      "c:\\HACKS\\"
      to
      Code:
      "\\dllfolder"
      , where injectable dll is located in the dllfolder and executable in a previous folder
      How to inject dll located same directory

    7. Thanks uixhc94 thanked for this post
    8. #7
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uixhc94's Avatar
      Join Date
      Nov 2012
      Posts
      12
      Thanks (-->)
      1
      Thanks (<--)
      0
      thanks, problem solved.!!!!!!!!!!

    9. #8
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uixhc94's Avatar
      Join Date
      Nov 2012
      Posts
      12
      Thanks (-->)
      1
      Thanks (<--)
      0
      oh no!
      i did that and not works...

    10. #9
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      uixhc94's Avatar
      Join Date
      Nov 2012
      Posts
      12
      Thanks (-->)
      1
      Thanks (<--)
      0
      Click image for larger version. 

Name:	asdf.jpg 
Views:	13 
Size:	73.8 KB 
ID:	1416

      Is there something wrong?

    11. #10
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      velreine's Avatar
      Join Date
      Aug 2012
      Location
      Denmark
      Posts
      37
      Thanks (-->)
      1
      Thanks (<--)
      0
      Silent VPN
      char dllPath[250]; GetCurrentDirectory(MAX_PATH,dllpath) ;

      First of all you're making the char array without assigning it a value because you put ;
      Second, then you call a function "GetCurrentDirectory(x,x);" but it's not being used for anything.

      Correct way to do it:

      char dllPath[250] = GetCurrentDirectory(MAX_PATH, dllPath); // I havn't checked the functions parameters, but i suppose they are right.

      EDIT: Nevermind i should've read GetCurrentDirectory's parameters before posting, on a side note i noted the output from GetCurrentDirectory is in format:

      C:\FolderA\SubFolderA\

      Instead of

      C:\\FolderA\\SubFolderA\\

      As the dllPath[250] is assigned. (By Fleep)
      Last edited by velreine; 11-13-2012 at 04:17 PM.

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. [Help] Cannot open include file: 'd3dx9.h': No such file or directory"
      By Raw Development in forum C/C++
      Replies: 11
      Last Post: 04-09-2016, 04:05 PM
    2. [Help] I inject DLL but nothing happens
      By FloppyWhale in forum Assault Cube Hacks
      Replies: 5
      Last Post: 02-06-2016, 08:27 PM
    3. [Help] Can't inject .dll twice??
      By heanz in forum C/C++
      Replies: 8
      Last Post: 06-08-2015, 11:28 AM
    4. C# inject to browser?
      By lolaap in forum C#
      Replies: 1
      Last Post: 01-14-2015, 01:14 PM
    5. Can't inject DLL. Tryed everything.
      By Geej in forum Hacking Help
      Replies: 19
      Last Post: 05-05-2013, 05:42 AM