mirror of
https://github.com/QuasarApp/pe-parse.git
synced 2025-04-27 12:54:31 +00:00
.
This commit is contained in:
parent
eb8c79d522
commit
9492bf2e98
@ -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
|
||||
|
@ -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;
|
||||
|
12
parser-library/to_string.h
Normal file
12
parser-library/to_string.h
Normal 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
|
Loading…
x
Reference in New Issue
Block a user