Implemented loading of multiple DLLs
This commit is contained in:
parent
58a157c864
commit
3eba9fb526
4 changed files with 57 additions and 57 deletions
|
@ -154,7 +154,24 @@ func write(writer io.Writer, code []byte, data []byte) error {
|
|||
case "mac":
|
||||
macho.Write(buffer, code, data)
|
||||
case "windows":
|
||||
pe.Write(buffer, code, data)
|
||||
dlls := []pe.DLL{
|
||||
{
|
||||
Name: "kernel32.dll",
|
||||
Functions: []string{
|
||||
"ExitProcess",
|
||||
"GetStdHandle",
|
||||
"WriteFile",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "user32.dll",
|
||||
Functions: []string{
|
||||
"MessageBoxA",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
pe.Write(buffer, code, data, dlls)
|
||||
default:
|
||||
return fmt.Errorf("unsupported platform '%s'", config.TargetOS)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue