Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.3.0 #433

Merged
merged 32 commits into from
May 13, 2023
Merged

5.3.0 #433

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
15c3bab
Add LazyVariable<TOwner, TValue>
Washi1337 Apr 20, 2023
6ac13ad
Move PE.File, PE and remainder of DotNet to new lazyvar.
Washi1337 Apr 20, 2023
89f934b
Migrate Pdb to new lazyvar.
Washi1337 Apr 20, 2023
6011f7e
Replace uses of DiagnosticBag with IErrorListener where feasible in t…
ds5678 Apr 26, 2023
6942268
Add signature comparer versioning test.
Washi1337 Apr 27, 2023
3f20b0d
BUGGIX: Do not include version in hashcode computation when relaxing …
Washi1337 Apr 27, 2023
64acd1c
BUGFIX: Skip Windows specific tests on Unix platforms.
Washi1337 Apr 27, 2023
080442f
Add ModuleDefinition::IsLoadedAs32Bit, add Platform::Is32Bit and ::Po…
Washi1337 Apr 29, 2023
abd981f
Add ZeroesSegment, add support for reading fieldrva data from virtual…
Washi1337 Apr 29, 2023
a6e4b24
Add read support for intptr fieldrva data.
Washi1337 Apr 29, 2023
0945321
Merge pull request #429 from Washi1337/issue/hashcode-version-exclusion
Washi1337 Apr 29, 2023
2007f94
Merge pull request #428 from Washi1337/feature/owned-lazyvars
Washi1337 Apr 29, 2023
eb5254c
BUGFIX: GetHashCode on TypeDefOrRefSignature should return same hashc…
Washi1337 Apr 29, 2023
59c1e35
Update docs.
Washi1337 Apr 29, 2023
2c99d0a
Extend PE file documentation.
Washi1337 May 3, 2023
78753a0
Add OriginalFirstThunk == 0 test.
Washi1337 May 5, 2023
7a1a4e9
BUGFIX: Default to FirstThunk if OriginalFirstThunk is invalid.
Washi1337 May 5, 2023
ef4b945
Rename import reader variables to better reflect their purpose.
Washi1337 May 6, 2023
1cd589b
Merge pull request #432 from Washi1337/issue/zero-oft-tables
Washi1337 May 6, 2023
aeeebba
Rename prefer32Bit -> canLoadAs32Bit.
Washi1337 May 6, 2023
7b53f6f
Merge pull request #430 from Washi1337/feature/field-rva-improvements
Washi1337 May 6, 2023
687f46f
Add ManagedPEImageBuilder::ErrorListener to allow for better DI.
Washi1337 May 6, 2023
01764bc
Normalize some tests with new builder API.
Washi1337 May 6, 2023
9ed4ebe
Update docs on new image builder API.
Washi1337 May 6, 2023
276f6e6
Add ToPEImage() overload that allows for ignoring non-fatal errors.
Washi1337 May 7, 2023
7ae64f8
Merge pull request #367 from ds5678/use-error-listener-while-building…
Washi1337 May 7, 2023
394d285
Bump version
Washi1337 May 7, 2023
48aadf6
Initial migration to docfx.
Washi1337 May 8, 2023
681861b
Avoid inconsistent sort by implementing a random shuffle instead of u…
Washi1337 May 10, 2023
2545e1a
Improve layout of API docs. Fix typos.
Washi1337 May 13, 2023
11b6af9
Make README more concise and update docs URLs.
Washi1337 May 13, 2023
2d2ca30
Merge branch 'feature/docfx-migration' into development
Washi1337 May 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<RepositoryUrl>https://github.com/Washi1337/AsmResolver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<LangVersion>10</LangVersion>
<Version>5.2.0</Version>
<Version>5.3.0</Version>
</PropertyGroup>

</Project>
84 changes: 36 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,45 @@
[![Master branch build status](https://img.shields.io/appveyor/ci/Washi1337/AsmResolver/master.svg)](https://ci.appveyor.com/project/Washi1337/asmresolver/branch/master)
[![Nuget feed](https://img.shields.io/nuget/v/AsmResolver.svg)](https://www.nuget.org/packages/AsmResolver/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Documentation Status](https://readthedocs.org/projects/asmresolver/badge/?version=latest)](https://asmresolver.readthedocs.io/en/latest/?badge=latest)
[![Discord](https://img.shields.io/discord/961647807591243796.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/Y7DTBkbhJJ)

AsmResolver is a PE inspection library allowing .NET programmers to read, modify and write executable files. This includes .NET as well as native images. The library exposes high-level representations of the PE, while still allowing the user to access low-level structures.
AsmResolver is a Portable Executable (PE) inspection library that is able to read, modify and write executable files. This includes .NET modules as well as native images. The library exposes high-level representations of the PE, while still allowing the user to access low-level structures.

AsmResolver is released under the MIT license.


## Features

AsmResolver has a lot of features. Below a non-exhaustive list:

- [x] Create, read and write PE files
- [x] Inspect and update PE headers.
- [x] Create, read and write sections.
- [x] Create, read and write various data directories
- [x] Debug Directory (CodeView)
- [x] .NET Directory
- [x] CIL assembler and disassemblers
- [x] Metadata Directory (tables, strings, user-strings, blobs, GUIDs)
- [x] Resources Directory
- [x] Strong Name Signing
- [x] VTable Fixup Directory
- [x] Exception Directory (AMD64)
- [x] Export Directory
- [x] Import Directory
- [x] Base Relocation Directory
- [x] TLS Directory
- [x] Win32 Resources Directory
- [x] Fully mutable object model for .NET modules that is similar to System.Reflection
- [x] Strong type-system with many useful factory methods for quickly constructing new metadata.
- [x] Full metadata importing and cloning (useful for injecting metadata into another assembly)
- [x] .NET Framework 2.0+, .NET Core and .NET 5+ binary file support.
- [x] Infer memory layout of types statically.
- [x] Create, read and write managed resource sets (`.resources` files)
- [x] Create new method bodies containing native code.
- [x] Highly configurable reader and writer options and custom error handling for both.
- [x] Rich support for AppHost and SingleFileHost bundled files.
## Main Features

AsmResolver has a lot of features. Below is a non-exhaustive list of the highlights:

- [x] Create, read, modify, write and patch PE files.
- [x] Full access to sections, data directories and their interpretations.
- [x] Rich support for .NET modules with an intuitive API similar to `System.Reflection`.
- [x] Managed, native and dynamic method body support.
- [x] Easy metadata importing and cloning.
- [x] Managed resource file serializers and deserializers.
- [x] Support for AppHost / SingleFileHost bundles.
- [x] Read PDB symbols.
- [x] Fully managed cross-platform API (No DIA or similar required).
- [x] .NET Standard 2.0 compatible.
- [x] Documented.
- [x] Unit tested.


## Documentation

Check out the [wiki](https://asmresolver.readthedocs.org/) for guides and information on how to use the library.
- [Guides](https://docs.washi.dev/asmresolver)
- [API Reference](https://docs.washi.dev/asmresolver/api/core/AsmResolver.html)


## Binaries

Stable builds:
Stable Builds:

- [GitHub releases](https://github.com/Washi1337/AsmResolver/releases)
- [NuGet feed](https://www.nuget.org/packages/AsmResolver/)
- [NuGet Feed](https://www.nuget.org/packages/AsmResolver/)
- [GitHub Releases](https://github.com/Washi1337/AsmResolver/releases)

Nightly builds:
Nightly Builds:

- [AppVeyor](https://ci.appveyor.com/project/Washi1337/asmresolver/build/artifacts)

Expand All @@ -67,36 +53,38 @@ Nightly builds:

## Compiling

The solution can be build using the .NET SDK or an IDE that works with the .NET SDK (such as Visual Studio and JetBrains Rider). The main packages target .NET Standard 2.0, and the xUnit test projects target .NET Core 3.1.
The solution can be built using the .NET SDK or an IDE that works with it (e.g., Visual Studio and JetBrains Rider). The main packages target LTS versions of various .NET runtimes (.NET Standard 2.0, .NET Core 3.1 and .NET 6.0).

To build the project from the commandline, use:
To build the project from the command line, use:
```bash
$ dotnet restore
$ dotnet build
```

To run all tests, simply run:
To run all tests, use:
```bash
$ dotnet test
```
For running the tests successfully, you will need to have various versions of .NET installed (ranging from .NET Framework to .NET Core 3.1 and .NET 5+), as the unit tests verify reading binaries targeting various .NET runtimes.


## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on general workflow and code style.
- See [CONTRIBUTING.md](CONTRIBUTING.md).


## Found a bug or have questions?
## Support

Please use the [issue tracker](https://github.com/Washi1337/AsmResolver/issues). Try to be as descriptive as possible.
- [Issue Tracker](https://github.com/Washi1337/AsmResolver/issues)
- [Discussion Board](github.com/washi1337/asmresolver/discussions)
- [Discord](https://discord.gg/Y7DTBkbhJJ)

You can also join the [Discord](https://discord.gg/Y7DTBkbhJJ) to engage more directly with the community.

## Acknowledgements
## Acknowledgments

AsmResolver started out as a hobby project, but has grown into a community project with various contributors. Without these people, AsmResolver would not have been where it is today!
AsmResolver started as a hobby project but has grown into a community project with various contributors. Without these people, AsmResolver would not have been where it is today!

- Special thanks to all the people who contributed [directly with code commits](https://github.com/Washi1337/AsmResolver/graphs/contributors).

- Another big thank you to all the people that suggested new features, provided feedback on the API design, have done extensive testing, and/or reported bugs on the [issue board](https://github.com/Washi1337/AsmResolver/issues), by e-mail, or through DMs.

If you feel you have been under-represented in these acknowledgements, feel free to contact me.
If you feel you have been under-represented in these acknowledgments, feel free to reach out.
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- master

image: Visual Studio 2022
version: 5.2.0-master-build.{build}
version: 5.3.0-master-build.{build}
configuration: Release

skip_commits:
Expand Down Expand Up @@ -33,7 +33,7 @@
- development

image: Visual Studio 2022
version: 5.2.0-dev-build.{build}
version: 5.3.0-dev-build.{build}
configuration: Release

skip_commits:
Expand Down
11 changes: 11 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
###############
# folder #
###############
/**/DROP/
/**/TEMP/
/**/packages/
/**/bin/
/**/obj/
_site/
api/*/*.yml
api/*/*.manifest
4 changes: 4 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# AsmResolver API Reference

This is the full API reference of the AsmResolver project.

12 changes: 12 additions & 0 deletions docs/api/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: AsmResolver.dll
href: core/toc.yml
- name: AsmResolver.PE.File.dll
href: pe-file/toc.yml
- name: AsmResolver.PE.dll
href: pe/toc.yml
- name: AsmResolver.PE.Win32Resources.dll
href: win32resources/toc.yml
- name: AsmResolver.DotNet.dll
href: dotnet/toc.yml
- name: AsmResolver.Symbols.Pdb.dll
href: symbols/toc.yml
Loading