 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue May 13, 2008 3:45 pm Post subject: [RELEASE]Process Killer C++ v1.0 |
|
|
I finished my Process Killer. It's all Win32 API coding, no visual. It's open sourced. And it's in C++ (^^). It was made in MSVC++ so if you have it you can open the project or solution. If not you can view the code in main.cpp, resource.rc, and resource.h. I also plan on releasing a v2.0 pretty soon.
Credits:
Me creating and coding
Lurc for helping with process killing function API understanding as well as the skeleton code for the function
blankrider for helping with the resources
Wiccaan for helping by making sure I didn't use more access rights I needed.
_________________
8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Tue May 13, 2008 4:15 pm Post subject: |
|
|
One thing i noticed
I added some error handling
IF the function is a bool i would call it using error handling
Changed the PK and GetIndexName
Now if you kill a unkillable process, it will handle and not delete the string
_________________
|
|
Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Tue May 13, 2008 4:48 pm Post subject: |
|
|
Now you can kill system critical process.
Code: | //main.h: AdjustTokenToDebug function
BOOL AdjustTokenToDebug()
{
//Define variables.
LUID tLUID; HANDLE hToken; TOKEN_PRIVILEGES tTP, tTPOld;
DWORD lengthReturned; BOOL ret = TRUE;
//Fill the tLUID struct with our privilage info.
if(LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tLUID)) {
//Open the token up.
if(OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,&hToken)) {
//Modify it so we become teh debuggzors.
tTP.PrivilegeCount=1;
tTP.Privileges->Attributes=SE_PRIVILEGE_ENABLED;
tTP.Privileges->Luid.HighPart=tLUID.HighPart;
tTP.Privileges->Luid.LowPart=tLUID.LowPart;
//Make the changes and check for errors.
if(!AdjustTokenPrivileges(hToken,0,&tTP,sizeof(tTP),&tTPOld,&lengthReturned))
ret = FALSE; //Bad
CloseHandle(hToken);
} else ret = FALSE; //Bad
} else ret = FALSE; //Bad
return ret;
} |
|
|
Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Tue May 13, 2008 7:18 pm Post subject: |
|
|
I mentioned this in his other thread. But who wants to kill the critical system processes
I myself will pass
_________________
|
|
Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Sat May 24, 2008 6:45 am Post subject: |
|
|
Flyte wrote: | Now you can kill system critical process.
Code: | //main.h: AdjustTokenToDebug function
BOOL AdjustTokenToDebug()
{
//Define variables.
LUID tLUID; HANDLE hToken; TOKEN_PRIVILEGES tTP, tTPOld;
DWORD lengthReturned; BOOL ret = TRUE;
//Fill the tLUID struct with our privilage info.
if(LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tLUID)) {
//Open the token up.
if(OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,&hToken)) {
//Modify it so we become teh debuggzors.
tTP.PrivilegeCount=1;
tTP.Privileges->Attributes=SE_PRIVILEGE_ENABLED;
tTP.Privileges->Luid.HighPart=tLUID.HighPart;
tTP.Privileges->Luid.LowPart=tLUID.LowPart;
//Make the changes and check for errors.
if(!AdjustTokenPrivileges(hToken,0,&tTP,sizeof(tTP),&tTPOld,&lengthReturned))
ret = FALSE; //Bad
CloseHandle(hToken);
} else ret = FALSE; //Bad
} else ret = FALSE; //Bad
return ret;
} |
|
i tried your code but seems no effect. i tried it to kill "services.exe" but i can't OpenProcess() it with access flag TERMINATE_PROCESS. I can only Open it with PROCESS_QUERY_INFORMATION | PROCESS_VM_READ.
Code: |
#include <iostream>
#include <windows.h>
#include <tlhelp32.h>
using namespace std;
PROCESSENTRY32 pe32;
HANDLE hProcess = NULL;
bool GetProcessInfo( PROCESSENTRY32* pe, char szExeFile[] )
{
PROCESSENTRY32 proc32;
proc32.dwSize = sizeof( PROCESSENTRY32 );
HANDLE hSnapshot = NULL;
hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
if( Process32First( hSnapshot, &proc32 ))
{
do{
if( strcmp( proc32.szExeFile, szExeFile ) == 0 )
{
CloseHandle( hSnapshot );
memcpy( pe, &proc32, sizeof( PROCESSENTRY32 ));
return true;
}
}while( Process32Next( hSnapshot, &proc32 ));
}
CloseHandle( hSnapshot );
return false;
}
BOOL AdjustTokenToDebug()
{
LUID tLUID; HANDLE hToken; TOKEN_PRIVILEGES tTP, tTPOld;
DWORD lengthReturned; BOOL ret = TRUE;
if(LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tLUID)) {
if(OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,&hToken)) {
tTP.PrivilegeCount=1;
tTP.Privileges->Attributes=SE_PRIVILEGE_ENABLED;
tTP.Privileges->Luid.HighPart=tLUID.HighPart;
tTP.Privileges->Luid.LowPart=tLUID.LowPart;
if(!AdjustTokenPrivileges(hToken, 0,&tTP,sizeof(tTP),&tTPOld,&lengthReturned))
ret = FALSE;
CloseHandle(hToken);
} else ret = FALSE;
} else ret = FALSE;
return ret;
}
int main()
{
if( !AdjustTokenToDebug() )
cout << "Failed!\n";
if( !GetProcessInfo( &pe32, "services.exe" ))
cout << "Not found!\n";
hProcess = OpenProcess( PROCESS_TERMINATE, 0, pe32.th32ProcessID );
if( TerminateProcess( hProcess, 0 ))
cout << "Process Terminated!\n";
else
cout << "Failed to terminate\n";
if( hProcess != NULL )
CloseHandle( hProcess );
cin.sync();
cin.ignore();
return 0;
}
|
_________________
Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|