output from nc not displayed
This commit is contained in:
parent
84d8cc9c58
commit
6568d286aa
|
@ -8,14 +8,14 @@ import (
|
|||
|
||||
func startNetcatListener(lport string) {
|
||||
// Create the command to run netcat as a listener
|
||||
cmd := exec.Command("nc", "-lvp", lport)
|
||||
cli := exec.Command("nc", "-lvp", lport)
|
||||
|
||||
// Set up the output to be printed to the console
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cli.Stdout = os.Stdout
|
||||
cli.Stderr = os.Stderr
|
||||
|
||||
// Run the command
|
||||
err := cmd.Run()
|
||||
err := cli.Run()
|
||||
if err != nil {
|
||||
fmt.Println("Error starting netcat listener:", err)
|
||||
os.Exit(1)
|
||||
|
|
Loading…
Reference in a new issue