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

[SUGGESTION] add 32 or 64 bit architecture to (or aside) BinaryMagic function #8

Open
nkxxll opened this issue Feb 2, 2024 · 0 comments

Comments

@nkxxll
Copy link

nkxxll commented Feb 2, 2024

func BinaryMagic(buf []byte) (int, error) {

So here is my suggestion if you like it I am happy to implement it and make a PR:
My suggestion is to look for the architecture type 32 or 64 bit in the magic header in addition to the file type.

After looking at this three sites I am confident that this is an very easy task:

I think because of backwards compatibility it is not a viable option to extend the BinaryMagic function therefor I would implement this feature in a new function ArchType or so.
I got to this issue because I read the injection code for executable files in the backdoorfactory repo and stumbled upon a todo-comment with the arch type.
I will fix that too just thought I can start here to make it a nicer fix 😄.

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

No branches or pull requests

1 participant