Exemple #1
0
void Stollmann::comTransport(HANDLE h, int eventNo, bool a3, void *buffer, uint32 size)
{
	if(eventNo != 3)
		return;

	MessagePacket *packet = (MessagePacket*)new uint8[size+sizeof(MessagePacket)];

	DbgPrint("Com read, handle: %08X", h);
	memcpy(packet->getData(), buffer, size);
	packet->length = size;
	packet->description[0] = '\0';
	packet->type = RECV;

	sendMessagePacket(packet);

	delete []packet;
}
Exemple #2
0
// Stollmann hooks
int Stollmann::comWrite(HANDLE h, void* buffer, int size)
{
	MessagePacket *packet = (MessagePacket*)new uint8[size+sizeof(MessagePacket)];
	
	if(comHandle == NULL)
		comHandle = h;

	DbgPrint("Com write, handle: %08X", h);
	memcpy(packet->getData(), buffer, size);
	packet->length = size;
	packet->description[0] = '\0';
	packet->type = SEND;

	sendMessagePacket(packet);

	delete []packet;
	return pComWrite(h, buffer, size);
}
Exemple #3
0
void Stollmann::pythonComWrite(void* buffer, int size)
{
	// Guard
	if(comHandle == NULL)
		return;

	MessagePacket *packet = (MessagePacket*)new uint8[size+sizeof(MessagePacket)];

	DbgPrint("Python com write, handle: %08X", comHandle);
	packet->reset();
	memcpy(packet->getData(), buffer, size);
	packet->length = size;
	packet->type = INJECT_SEND;

	sendMessagePacket(packet);

	delete []packet;
	pComWrite(comHandle, buffer, size);
}