Don't like ads? PRO users don't see any ads ;-)

sProcess.cpp - CoD4 DLL hack

By: iWinterHD7s on Aug 21st, 2012  |  syntax: C++  |  size: 0.75 KB  |  hits: 38  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include "StdAfx.h"
  2. #include <string>
  3. #include <sstream>
  4. #include <atlstr.h>
  5. #include "sProcess.h"
  6.  
  7. sProcess::sProcess(void)
  8. {
  9.         Beep(2000,500);
  10.         TCHAR szFileFullPath[256];
  11.         ::GetModuleFileName(NULL,static_cast<LPTSTR>(szFileFullPath),256);
  12.         CString szProcessName(szFileFullPath);
  13.         int nPos = szProcessName.ReverseFind('\\');
  14.         szProcessName = szProcessName.Right(szProcessName.GetLength() - nPos - 1);
  15.  
  16.         std::stringstream ssTmp;
  17.         std::string Data;
  18.         std::string InjectMsg = "SyntheticDLL Injected!\nInside Process: ";
  19.  
  20.         ssTmp << szProcessName;
  21.         ssTmp >> Data;
  22.  
  23.         LPCSTR myString;
  24.         std::string msg = InjectMsg + Data;
  25.         myString = msg.c_str();
  26.         MessageBox(NULL, myString, "I'm Inside!", MB_ICONINFORMATION);
  27. }
  28.  
  29.  
  30. sProcess::~sProcess(void)
  31. {
  32. }