This commit is contained in:
munin 2013-11-22 19:28:04 -05:00
parent eb8c79d522
commit 9492bf2e98
3 changed files with 17 additions and 1 deletions

View File

@ -14,3 +14,7 @@ pe-parse supports these use cases via a minimal API that provides methods for
The interface is defined in `parser-library/parse.h`. The program in `dump-prog/dump.cpp` is an example of using the parser-library API to dump information about a PE file.
Internally, the parser-library uses a bounded buffer abstraction to access information stored in the PE file. This should help in constructing a sane parser that allows for detection of the use of bogus values in the PE that would result in out of bounds accesses of the input buffer. Once data is read from the file it is sanitized and placed in C++ STL containers of internal types.
Building
========
pe-parse is built using cmake and depends on boost. Once your platforms CMake knows how to find boost, build pe-parse through cmake . && make

View File

@ -25,7 +25,7 @@ THE SOFTWARE.
#include <list>
#include "parse.h"
#include "nt-headers.h"
#include <to_string.h>
#include "to_string.h"
using namespace std;
using namespace boost;

View File

@ -0,0 +1,12 @@
#ifndef _TO_STRING_H
#define _TO_STRING_H
#include <sstream>
template <class T>
static
std::string to_string(T t, std::ios_base & (*f)(std::ios_base&)) {
std::ostringstream oss;
oss << f << t;
return oss.str();
}
#endif