simple pwntools-like framework for go to interact with local and remote processes
go get -u github.com/r0lh/gwntools
package main
import github.com/r0lh/gwntools
func main() {
# start local binary with command-line argument
p := gwntools.Local(exec.Command("./my_local_binary", "--this-is-an-argument"))
# read line from process
r := p.ReadLine()
fmt.Printf("banner from process: %s", string(r))
# write to process
p.Write([]byte("AAAAAAPAYLOADAAAAAA\x41\x42\x43\x44\n")
# interact with process
p.Interactive()
}
package main
import github.com/r0lh/gwntools
func main() {
p := gwntool.Remote("127.0.0.1:4444")
# read line from remote service
r := p.ReadLine()
fmt.Printf("banner from server: %s", string(r))
# write to remote service
p.Write([]byte("AAAAAAPAYLOADAAAAAA\x41\x42\x43\x44\n")
}