Skip to content

Instantly share code, notes, and snippets.

@picatz
Created May 7, 2018 16:42
Show Gist options
  • Save picatz/499fc19e4bf0814056dd82306b5f21ed to your computer and use it in GitHub Desktop.
Save picatz/499fc19e4bf0814056dd82306b5f21ed to your computer and use it in GitHub Desktop.
Find imported symbols in PE file
package main
import (
"debug/pe"
"fmt"
)
func main() {
f, err := pe.Open("sample.exe")
if err != nil {
panic(err)
}
defer f.Close()
symbols, err := f.ImportedSymbols()
if err != nil {
panic(err)
}
for _, symbol := range symbols {
fmt.Println(symbol)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment