You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, on Windows, we only check the binary suffix to infer whether a file is executable or not (strings.HasSuffix(f.Name(), ".exe")). We can have a more sophisticated check for this if it is desired. However, we need to pull in github.com/Velocidex/go-pe or write a small package to accommodate our needs.
good find and go for it, but please don't copy/paste that code for citation and otherwise reasons.
As our only use case at the moment is a binary executable, I think the minimum logic can be used for the windows code (scanning header for magic bytes) and leave the other operating systems as-is (based on chmod info).
make sure you make a nice comment about the magic bytes in the windows impl!
Currently, on Windows, we only check the binary suffix to infer whether a file is executable or not (
strings.HasSuffix(f.Name(), ".exe")
). We can have a more sophisticated check for this if it is desired. However, we need to pull ingithub.com/Velocidex/go-pe
or write a small package to accommodate our needs.The steps that can be done are as follows:
The text was updated successfully, but these errors were encountered: