Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <TlHelp32.h>
  4. #include <string>
  5. #include <sstream>
  6. #include <ctime>
  7.  
  8. using namespace std;
  9.  
  10. DWORD Process(char* ProcessName)
  11. {
  12. HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
  13. PROCESSENTRY32 ProcEntry;
  14. ProcEntry.dwSize = sizeof(ProcEntry);
  15. do
  16. if (!strcmp(ProcEntry.szExeFile, ProcessName))
  17. {
  18. DWORD dwPID = ProcEntry.th32ProcessID;
  19. CloseHandle(hPID);
  20. return dwPID;
  21. }
  22. while (Process32Next(hPID, &ProcEntry));
  23.  
  24. cout << "noprocessfounderror" << endl;
  25. }
  26.  
  27.  
  28.  
  29. int main() {
  30. if (1) {
  31. #define ExampleHWID 123456789
  32. UCHAR szFileSys[255], szVolNameBuff[255];
  33. DWORD dwMFL, dwSysFlags;
  34. DWORD dwSerial;
  35. LPCTSTR szHD = "C:\\";
  36. GetVolumeInformation(szHD, (LPTSTR)szVolNameBuff, 255, &dwSerial, &dwMFL, &dwSysFlags, (LPTSTR)szFileSys, 255);
  37. std::string user = "oceans";
  38. std::string pwd = "negro";
  39. std::string input;
  40. std::string inputpwd;
  41. cout << "Please enter username:\n>";
  42. getline(cin, input);
  43. if (input == user)
  44. {
  45. cout << "Please enter password:\n>";
  46. getline(cin, inputpwd);
  47. if (inputpwd == pwd)
  48. {
  49. if (dwSerial == ExampleHWID)
  50. {
  51. cout << "Logged in, have fun\n>";
  52. char myDLL[MAX_PATH];
  53. GetFullPathName("pPasterHook.load", MAX_PATH, myDLL, 0);
  54.  
  55. DWORD dwProcess = Process("csgo.exe");
  56. HANDLE hProcess = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, FALSE, dwProcess);
  57.  
  58. LPVOID allocatedMem = VirtualAllocEx(hProcess, NULL, sizeof(myDLL), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
  59. WriteProcessMemory(hProcess, allocatedMem, myDLL, sizeof(myDLL), NULL);
  60.  
  61. CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibrary, allocatedMem, 0, 0);
  62.  
  63. CloseHandle(hProcess);
  64. }
  65. }
  66. }
  67. else
  68. {
  69. cout << "Wrong username, relaunch app\n>";
  70. }
  71. }
  72.  
  73. return 0;
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement