Commit Graph

40 Commits

Author SHA1 Message Date
Romain Thomas 969411f8ef Welcome 2023 2023-01-03 10:38:09 +01:00
Romain Thomas 1149e81c2b Merge pull request #849 from mrexodia/msvc-runtime
Fix MSVC runtime selection
2023-01-03 09:20:42 +00:00
Duncan Ogilvie bbdc62f691 Fix MSVC runtime selection 2023-01-02 17:30:42 +01:00
Romain Thomas 91d5162be4 Enable support for parsing a Mach-O from memory 2022-11-22 10:55:15 +01:00
Romain Thomas e1a8244b92 Enhance Mach-O's builder and add support for recent LC commands 2022-04-16 15:10:56 +02:00
Romain Thomas 266f989e52 Enable support for modifying section-less ELF binaries 2022-04-03 19:34:44 +02:00
Romain Thomas baa023b914 Remove exceptions 2022-04-01 05:38:30 +02:00
Romain Thomas 77328b0071 Bump year 2022-02-08 21:16:25 +01:00
Romain Thomas e9782c5927 Clean & modernize LIEF code base
This commit (obviously non-atomic) cleans LIEF's code base by:
  - Using pointer semantics (`std::unique_ptr<>`)
  - Using LEAF boost error in the binary stream
  - Reducing the scope of the iterators (`it_section`, ...)
  - Removing `Structures.hpp` from the public headers
  - etc
2022-02-05 06:09:06 +01:00
rthomas a615adbee4 This commit cleans and modernizes the code base of LIEF.
Among the changes:

- It removes the ``and, or, not`` keywords
- It updates the Documentation
- It moves the internal structures in the ``details::`` namespace
2022-01-27 20:18:54 +01:00
Romain Thomas 6720ed2385 Update copyright 2021-01-16 18:17:17 +01:00
Romain Thomas 8511b606d2 Add authenticode example 2021-01-16 09:44:52 +01:00
rthomas 634c2fc98e Enhance PE Authenticode 2021-01-16 09:44:51 +01:00
Romain Thomas f4fc5784af Enhance CI & platforms 2021-01-03 17:52:44 +01:00
Romain Thomas 03ba40b735 Setup Ninja for windows 2020-12-05 11:30:53 +01:00
rthomas 1364f22c78 Improve logging interface 2020-11-09 21:02:50 +01:00
1orenz0 fcc75dd879 Parse PE debug data directory as a list of debug entries
PE's DATA_DIRECTORY_DEBUG does not define a single debug entry, but
a list of struct pe_debug entries (the number of entries is determined
by the data directory's size).

This commit reflect this layout by returning a vector<> when calling
PE.debug()
2018-11-29 09:16:34 +01:00
Romain Thomas b5a08463ad Expose API to list functions found in a binary 2018-09-12 14:44:18 +02:00
Adrien Guinet 89d4de54c8 Fix git tag commmand to always work
Forward CRT on other targets
2018-08-29 13:38:27 +02:00
Adrien Guinet 4b03ac45e0 Remove LIEF_SHARED_LIB from cmake
Moreover, add macros to force the CRT usage when using MSVC.
This is based on the LLVM one.
2018-08-29 08:50:56 +02:00
Romain Thomas 406115c8d0 Enhance Mach-O modification
* Add load command
  * Add sections
  * Add segments

Resolve #46 (partially)
2018-06-27 14:44:42 +02:00
Romain Thomas cd1cc457cf Resolve #119 and enhance ELF Python bindings 2018-06-08 10:48:33 +02:00
Romain Thomas c765d086cc Fix infinite loop in export-trie parser 2018-05-30 11:14:36 +02:00
Romain Thomas 4ef1bb845f Add new formats: OAT, DEX, VDEX, ART 2018-05-04 12:46:28 +02:00
Romain Thomas 4ef839c3d8 Enhance BinaryStream Interface 2018-04-15 08:55:23 +02:00
Romain Thomas d26fdb41ec Use /MTd when Debug build
Fix: #147
2018-03-09 08:29:31 +01:00
Romain Thomas eab4a7614f Parse PE Code View (PDB 7.0)
Resolve: #138
2018-02-17 12:50:10 +01:00
Romain Thomas 3602643f5d Fix memory leaks in the MachO Python API and create FatBinary
API Changes:

LIEF::MachO::Parser won't return a 'std::vector' of MachO::Binary*
but a pointer to MachO::FatBinary object
It's a kind of wrapper on std::vector<MachO::Binary*>
2017-09-29 13:06:08 +02:00
Romain Thomas accf47ebf2 Fix performances issues
Fix #94
2017-09-20 13:58:19 +02:00
Romain Thomas a4c69f7868 Rename getter from get_XXX to XXX
related to #66
2017-09-07 14:45:41 +02:00
Romain Thomas 0179a934a5 Show abstract relocations 2017-09-05 22:13:26 +02:00
Romain Thomas 123f396d6a Clean up 2017-09-03 20:51:09 +02:00
Romain Thomas b94900ca7f Improve the ELF part of LIEF
Major changes (features):
  * Enable adding multiple sections/segments - Executable (PIE or not), Library
  * Enable adding multiple dynamic entries (DT_NEEDED, DT_INIT etc)
  * Enable adding multiple relocations
  * Enable adding multiple dynamic symbols
  * Enable segment replacement

Major changes (API):
  * Getters Binary::get_*name*() has been renamed to "name()"
  * Binary::add(const DynamicEntry& entry) - To add an entry in the dynamic table
  * Section& Binary::add(const Section& section, bool loaded = true) - To add a section(s)
  * Segment& Binary::add(const Segment& segment, uint64_t base = 0) - To add segments
  * Segment& replace(const Segment& new_segment, const Segment& original_segment, uint64_t base = 0)
  * Binary's last_offset_section(), last_offset_segment(), next_virtual_address()
    to have information about offset
  * Binary's add_library(), get_library(), has_library() to handle
    DT_NEEDED entries

Other changes:
  * Binary::insert_content() - Use add(const Section&) or add(const Segment&) instead
  * ELF's DataHandler has been cleaned
  * Through LIEF::Section one can look for integers, strings, data
    within the section (see LIEF::Section::search,
    LIEF::Section::search_all)
  * Through LIEF::Binary one can get *xref* of a number (or address)
    see LIEF::Binary::xref function
  * To access to the Abstract binary in Python, one can now use
    the 'abstract' attribute. (e.g. binary.abstract.header.is_32)

Resolve: #83
Resolve: #66
Resolve: #48
2017-09-02 08:54:54 +02:00
Romain Thomas 4600c2ba8d Provide API to configure the LIEF's logger
API changes:

  LIEF::Logger::{set_level, set_verbose_level...}

Resolve: #68
2017-07-31 15:16:02 +02:00
Romain Thomas 782295bfb8 Parser Dyld Info in depth (binding, rebases, exports)
Binding and rebase bytes codes are now parsed as well as export info
trie. Through ``RelocationDyld`` we created kind of *virtual* relocation
to modeling relocation process performed by Dyld

API Changes (Python / C++)
  * MachO::RelocationDyld   - Added
  * MachO::RelocationObject - Added
  * MachO::Relocation       - Updated according to previous ones

  * MachO::ExportInfo       - Added
  * MachO::BindingInfo      - Added

  * MachO::DyldInfo::rebase_opcodes    - Added
  * MachO::DyldInfo::bindings          - Added
  * MachO::DyldInfo::bind_opcodes      - Added
  * MachO::DyldInfo::weak_bind_opcodes - Added
  * MachO::DyldInfo::lazy_bind_opcodes - Added
  * MachO::DyldInfo::exports           - Added
  * MachO::DyldInfo::export_trie       - Added

  * MachO::Symbol
    - Tied to MachO::BindingInfo (if any)
    - Tied to MachO::ExportInfo (if any)

  * MachO::Binary::relocations - Added
  * MachO::Binary::has_symbol  - Added
  * MachO::Binary::get_symbol  - Added

Resolve: #67
2017-07-30 17:29:09 +02:00
Romain Thomas 6dd8b10325 Provide 'FindLIEF.cmake' to be easily integrated with CMake
* Now examples are provided in packages (SDK)
  * Add an examples in the doc to use 'find_packges()' with LIEF
2017-07-19 15:46:37 +02:00
Romain Thomas 8ddc71d337 Parse PE Rich Header (resolve #15) 2017-06-27 09:12:40 +02:00
Romain Thomas 37cd8aa3cc Resolve #36 2017-06-11 15:26:42 +02:00
Romain Thomas d75fd098b9 Enclose paths within quotes (fix #9) 2017-04-05 15:33:18 +02:00
Romain Thomas 306a191a03 First public release 2017-03-30 16:56:49 +02:00