executor

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

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))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(cmd, dir string, stdin io.ReadCloser) ([]byte, []byte, error)

Exec command

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL