Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- #include <TlHelp32.h>
- #include <string>
- #include <sstream>
- #include <ctime>
- using namespace std;
- DWORD Process(char* ProcessName)
- {
- HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
- PROCESSENTRY32 ProcEntry;
- ProcEntry.dwSize = sizeof(ProcEntry);
- do
- if (!strcmp(ProcEntry.szExeFile, ProcessName))
- {
- DWORD dwPID = ProcEntry.th32ProcessID;
- CloseHandle(hPID);
- return dwPID;
- }
- while (Process32Next(hPID, &ProcEntry));
- cout << "noprocessfounderror" << endl;
- }
- int main() {
- if (1) {
- #define ExampleHWID 123456789
- UCHAR szFileSys[255], szVolNameBuff[255];
- DWORD dwMFL, dwSysFlags;
- DWORD dwSerial;
- LPCTSTR szHD = "C:\\";
- GetVolumeInformation(szHD, (LPTSTR)szVolNameBuff, 255, &dwSerial, &dwMFL, &dwSysFlags, (LPTSTR)szFileSys, 255);
- std::string user = "oceans";
- std::string pwd = "negro";
- std::string input;
- std::string inputpwd;
- cout << "Please enter username:\n>";
- getline(cin, input);
- if (input == user)
- {
- cout << "Please enter password:\n>";
- getline(cin, inputpwd);
- if (inputpwd == pwd)
- {
- if (dwSerial == ExampleHWID)
- {
- cout << "Logged in, have fun\n>";
- char myDLL[MAX_PATH];
- GetFullPathName("pPasterHook.load", MAX_PATH, myDLL, 0);
- DWORD dwProcess = Process("csgo.exe");
- HANDLE hProcess = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, FALSE, dwProcess);
- LPVOID allocatedMem = VirtualAllocEx(hProcess, NULL, sizeof(myDLL), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
- WriteProcessMemory(hProcess, allocatedMem, myDLL, sizeof(myDLL), NULL);
- CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibrary, allocatedMem, 0, 0);
- CloseHandle(hProcess);
- }
- }
- }
- else
- {
- cout << "Wrong username, relaunch app\n>";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement