Created
May 7, 2018 16:42
-
-
Save picatz/499fc19e4bf0814056dd82306b5f21ed to your computer and use it in GitHub Desktop.
Find imported symbols in PE file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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