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

Resources rebuild support #35

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Conversation

swismer
Copy link
Collaborator

@swismer swismer commented Aug 21, 2023

Regarding the RebuildableStructure interface, I finally decided to drop it as the arguments differ between the various structures: Some need a base address, some need to know the padding pattern, but most of them need none of theses. So the rebuild method is now rather a naming convention. I moved the write method into a new interface called WritableStructure, which also adds some convenience methods to quickly write a structure into a byte array.

I had to learn that there is not the one and only way to write a PE file, especially for calculated fields. Whenever I did not find enough information on the internet, I checked which algorithm variant matched most of the files in my Program Files directory. Unfortunately, in case of the sizeOfInitializedData, the sample executable in this git repo did not comply to the majority, so I had to apply a small hack to the ResourceDirectoryTest, namely the method fixSizeOfInitializedData.

@kichik
Copy link
Owner

kichik commented Aug 23, 2023

I invited you to the repo as a contributor so you can merge things yourself. I seem to be mostly delaying you with my limited schedule for this project.

@swismer
Copy link
Collaborator Author

swismer commented Aug 23, 2023

Thank you for your trust. I just wanted to let you know that with this PR, most of the work that I initially planned to do is done. But I'd be willing to help maintaining and also further extending pecoff4j in case there are new ideas. So, if this information makes you rethink your offer, let me know. Otherwise, I will accept it in the following days.

@kichik
Copy link
Owner

kichik commented Aug 23, 2023

Thank you for your trust. I just wanted to let you know that with this PR, most of the work that I initially planned to do is done. But I'd be willing to help maintaining and also further extending pecoff4j in case there are new ideas. So, if this information makes you rethink your offer, let me know. Otherwise, I will accept it in the following days.

That's already more than I have done in the last five years. Please accept 😀

@swismer swismer merged commit f33f55c into kichik:master Aug 24, 2023
7 checks passed
@swismer swismer deleted the resources-rebuild-support branch August 24, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants