Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSMTP: 'Administrative prohibition' response after end of data [modified] Pin
kanikanz2-Jul-06 19:34
kanikanz2-Jul-06 19:34 
AnswerRe: SMTP: 'Administrative prohibition' response after end of data Pin
Michael Dunn2-Jul-06 20:58
sitebuilderMichael Dunn2-Jul-06 20:58 
GeneralRe: SMTP: 'Administrative prohibition' response after end of data Pin
kanikanz3-Jul-06 11:49
kanikanz3-Jul-06 11:49 
AnswerRe: SMTP: 'Administrative prohibition' response after end of data Pin
kanikanz10-Jul-06 13:57
kanikanz10-Jul-06 13:57 
QuestionHow to call Stored procedure in CDAO database Pin
maharaja pandian2-Jul-06 19:25
maharaja pandian2-Jul-06 19:25 
QuestionTrying to use OpenThread [modified] Pin
capricious_0012-Jul-06 18:48
capricious_0012-Jul-06 18:48 
QuestionRe: Trying to use OpenThread Pin
Hamid_RT2-Jul-06 18:58
Hamid_RT2-Jul-06 18:58 
AnswerRe: Trying to use OpenThread Pin
capricious_0012-Jul-06 19:09
capricious_0012-Jul-06 19:09 
Oh its a DLL Injector. It injects a DLL into an Open process. Here is a piece of the code for the DLL Injector. If there are some functions that appear unfamiliar like GetProcessThreads its because they are ones that creator defined.

bool DLLInject(DWORD pid, const char *path)
{
	//this will go through all TIDs of a process
	//and get one we can use
    DWORD tid[20];
	int inbytes = 20;
	GetProcessThreads(pid, &tid[0], &inbytes);

	if(pid == GetCurrentProcessId())
	{
        NumOut("Process will suspend itself and lock");
		return 0;
	}

	DWORD tiduse=0;
	for(int i=0; i<inbytes; i++)
	{
		HANDLE thread = OpenThread(THREAD_ALL_ACCESS, FALSE, tid[i]);
		if(!thread)
		{
			NumOut("ops");
			CloseHandle(thread);
		}
		else
		{
			SuspendThread(thread);
			CONTEXT ctx;
			ctx.ContextFlags = CONTEXT_FULL;
			GetThreadContext(thread, &ctx);
			ResumeThread(thread);
			CloseHandle(thread);
			
			//lower eips will crash the system
			if(ctx.Eip > 0x400000)
			{
				tiduse = tid[i];
				break; //one thread is good, break the loop
			}
			//NumOut("%d %X", tid[i], ctx.Eip);
		}
	}

	//do we have a good tid?
	if(!tiduse)
	{
		NumOut("No usable tid found");
		return 0;
	}

	//found a good tid already, now patch
	//excelent patching method

	HANDLE proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
	if(!proc)
		proc = OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE, FALSE, pid);

	HANDLE thread = OpenThread(THREAD_ALL_ACCESS, FALSE, tiduse);

	bool ret = WriteMemPatch(proc, thread, path);
	CloseHandle(proc);
	CloseHandle(thread);
	return ret;
}

GeneralRe: Trying to use OpenThread Pin
Hamid_RT2-Jul-06 19:37
Hamid_RT2-Jul-06 19:37 
AnswerRe: Trying to use OpenThread Pin
Michael Dunn2-Jul-06 21:00
sitebuilderMichael Dunn2-Jul-06 21:00 
GeneralRe: Trying to use OpenThread Pin
capricious_0013-Jul-06 0:01
capricious_0013-Jul-06 0:01 
QuestionMaking a DMA call from VC++ code Pin
Sonia Horra2-Jul-06 18:30
Sonia Horra2-Jul-06 18:30 
AnswerRe: Making a DMA call from VC++ code Pin
Hamid_RT2-Jul-06 22:50
Hamid_RT2-Jul-06 22:50 
GeneralRe: Making a DMA call from VC++ code Pin
Sonia Horra2-Jul-06 23:39
Sonia Horra2-Jul-06 23:39 
Questionauto run my c++ application??? Pin
mimimimilaw2-Jul-06 16:41
mimimimilaw2-Jul-06 16:41 
AnswerRe: auto run my c++ application??? Pin
bob169722-Jul-06 17:03
bob169722-Jul-06 17:03 
GeneralRe: auto run my c++ application??? [modified] Pin
mimimimilaw2-Jul-06 17:11
mimimimilaw2-Jul-06 17:11 
GeneralRe: auto run my c++ application??? Pin
Weiye Chen2-Jul-06 17:37
Weiye Chen2-Jul-06 17:37 
GeneralRe: auto run my c++ application??? Pin
bob169722-Jul-06 17:42
bob169722-Jul-06 17:42 
GeneralRe: auto run my c++ application??? [modified] Pin
mimimimilaw2-Jul-06 18:02
mimimimilaw2-Jul-06 18:02 
GeneralRe: auto run my c++ application??? Pin
bob169722-Jul-06 18:45
bob169722-Jul-06 18:45 
Questionscrolling text [modified] Pin
locoone2-Jul-06 15:39
locoone2-Jul-06 15:39 
AnswerRe: scrolling text Pin
Niklas L3-Jul-06 3:42
Niklas L3-Jul-06 3:42 
QuestionString and Substring Pin
Moujan2-Jul-06 13:23
Moujan2-Jul-06 13:23 
QuestionRe: String and Substring Pin
Hamid_RT2-Jul-06 22:41
Hamid_RT2-Jul-06 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.