- CMake: Refactor, added more warnings.
- Refactor
- Added Windows support
- Added a missing include file for linux.
- Do not set CMAKE_CXX_STANDARD on Windows
- Always initialize the stat struct
- CMake: update the required version, request C++11, disable GNU extensions
- CMake: Add default switch cases, fix GCC warnings.
- Prefer assignment from an empty object when initializing
* Adapt wrapper to support python3
This seems to work with either python3 and python2.
* converted test file
* Testing better get_byte implem
* Clean and working get_bytes wrapper
* Correct bytearray display method
* Documents macros for python 2/3 support
* Remove useless typedef
This is C++ code, typedefed struct is useless (and probably bad style
C++).
* Add some comments and C++ style cast.
* Replace new[] with nothrow version
* Update error message to indicate allocation failure
* NULL is replaced by nullptr
* Added parameter std::nothrow to operator new so in case of
failure it returns nullptr instead of throwing exception
std::bad_alloc. This is important due to check that follows
the statement. Example:
parsed_pe *p = new(std::nothrow) parsed_pe();
if (p == nullptr) {
...
}
* Using range-based for loops.
* Removed redundant boolean literals.
Example: if (readWord(...) == false) => if (!readWord(...))
* Resolved implicit casts.
Example: if (!ch) => if (ch == 0u)
* Created functions getImports, getExports, getRelocations from
parts of ParsePEFromFile to make it smaller and more readable.
* Using reinterpret_cast instead of C-style cast to convert
between unrelated types.
* Added braces around statements to improve readability.
PE file can contain any number of base relocation blocks, where
each of the blocks can contain any number of Type/Offset entries
beside of PageRVA and BlockSize fields. Without this fix only
first base relocation block is parsed.
Also fixes the issue #32.
lookupVA is initialized to 0. Also, if it remains 0 after the two
ifs, then ParsePEFromFile() returns NULL, since the section
lookup at the virtual address 0 is invalid.
* Put all of peparse in the peparse namespace.
* Fixes dupicate symbol problems when using the library inside other applications, namely Python
* Closes#25