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