This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Hook() | |
{ | |
while (TRUE) | |
{ | |
PsCreateSystemThread(&hThread, (ACCESS_MASK)0L, NULL, NULL, NULL, | |
(PKSTART_ROUTINE)HookInt2E, NULL); | |
KeWaitForSingleObject(&syncEvent, Executive, KernelMode, FALSE, NULL); | |
if (nIDTHooked == nProcessors) | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (TRUE) | |
{ | |
CLIENT_ID cid; | |
PVOID pThread; | |
PsCreateSystemThread(&hThread, 0L, NULL, NULL, &cid, | |
(PKSTART_ROUTINE)UnhookInt2E, NULL); | |
if (hThread) | |
{ | |
PsLookupThreadByThreadId(cid.UniqueThread, (PETHREAD *)&pThread); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Dump(void *ptr, int buflen) { | |
unsigned char *buf = (unsigned char*)ptr; | |
int i, j; | |
for (i=0; i<buflen; i+=16) { | |
printf("%06x: ", i); | |
for (j=0; j<16; j++) | |
if (i+j < buflen) | |
printf("%02x ", buf[i+j]); | |
else | |
printf(" "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
VOID NTAPI MyCallback(PVOID handle, DWORD reason, PVOID resv); | |
#pragma data_seg(".CRT$XLB") | |
PIMAGE_TLS_CALLBACK tls_entry = MyCallback; | |
#pragma data_seg() | |
#pragma comment(linker, "/INCLUDE:__tls_used") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#pragma comment(lib, "Version.lib") | |
BOOL GetAppVersion( char *LibName, WORD *MajorVersion, WORD *MinorVersion, WORD *BuildNumber, WORD *RevisionNumber ) | |
{ | |
DWORD dwHandle, dwLen; | |
UINT BufLen; | |
LPTSTR lpData; | |
VS_FIXEDFILEINFO *pFileInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <v8.h> | |
#include <vld.h> | |
#include <iostream> | |
void InvokeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) { | |
std::cout << "InvokeCallback" << std::endl; | |
} | |
void InstanceAccessorCallback(v8::Local<v8::String> property, | |
const v8::PropertyCallbackInfo<v8::Value>& args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/interprocess/managed_shared_memory.hpp> | |
#include <boost/interprocess/ipc/message_queue.hpp> | |
using namespace boost::interprocess; | |
const char kSharedMemory[] = | |
"asdv2_adblock_shared_object_{5095C5F0-D82D-4442-9A62-8769871F42D1}"; | |
const char kMessageQueue[] = | |
"asdv2_adblock_shared_queue_{5095C5F0-D82D-4442-9A62-8769871F42D1}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <objbase.h> | |
#include <iostream> | |
interface IX : IUnknown { | |
virtual void Fx() = 0; | |
}; | |
interface IY : IUnknown { | |
virtual void Fy() = 0; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
#define UID "[yy]" | |
#define STRINGIZE(x) STRINGIZE2(x) | |
#define STRINGIZE2(x) #x | |
#define LINE_STRING STRINGIZE(__LINE__) | |
#define DEBUG_PREFIX "["__FUNCTION__":"LINE_STRING"] " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FileVersion.h: interface for the CFileVersion class. | |
// by Manuel Laflamme | |
////////////////////////////////////////////////////////////////////// | |
#ifndef __FILEVERSION_H_ | |
#define __FILEVERSION_H_ | |
#if _MSC_VER >= 1000 | |
#pragma once | |
#endif // _MSC_VER >= 1000 | |
class CFileVersion { | |
// Construction |
OlderNewer