executor

Tests
Coverage Status
Go Report Card
PkgGoDev

Examples

package main

import (
	"fmt"

 	"github.com/solar-jsoc/executor"
)

func main() {
	stdOut, stdErr, err := executor.Exec("nmap -sV 1.1.1.1 -Pn -oX out.xml > /dev/null && cat out.xml", "", nil)
	if err != nil {
		fmt.Println(err)
		fmt.Println(stdErr)
		return
	}
	
	fmt.Println(string(stdOut))
}

GitHub

View Github