Click here to Skip to main content
12,449,098 members (53,127 online)
Click here to Skip to main content

Stats

118K views
6.6K downloads
177 bookmarked
Posted

Tamper Aware and Self Healing Code

, 15 Nov 2007 CPOL
Dynamically Detect Code Alterations and Repair In-Memory Executable Files Using Hashing and Crypto++
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

#include <windows.h>
#include <tchar.h>

#include <iostream>
#include <iomanip>
#include <string>

#ifdef UNICODE
#  define tcout wcout
#  define tcerr wcerr
#else
#  define tcout cout
#  define tcerr cerr
#endif

const UINT DUMP_SIZE = 96;
const UINT DEFAULT_DUMP_SIZE = 4096;

#define HEXADECIMAL_OUTPUT(width) std::setw(width) << std::hex \
    << std::uppercase << std::setfill(_T('0'))

#ifdef _DEBUG
#  pragma comment( lib, "cryptlibd")
#else
#  pragma comment( lib, "cryptlib")
#endif

// TODO: reference additional headers your program requires here

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jeffrey Walton
Systems / Hardware Administrator
United States United States
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160811.3 | Last Updated 15 Nov 2007
Article Copyright 2007 by Jeffrey Walton
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid