nicholasericksen / ddos

This is a simple load testing tool for understanding capacity and DDOS resistance for web services.
MIT License
0 stars 0 forks source link

Allow for specifying Curl commands to run in go routines #4

Open nicholasericksen opened 9 months ago

nicholasericksen commented 9 months ago

More than just GET should be supported.

Maybe user can specify list of curl commands to run ?

POC | GTFO

package main

import (
  "fmt"
  "os/exec"
  "strings"
)

func main () {
  cmd := "curl"
  args := "-X GET -I -H Content-Type: application/json https://google.com"
  out, err := exec.Command(cmd, strings.Split(args, " ")...).Output()

  if err != nil {
    fmt.Printf("%s", err)
  }

  fmt.Println("Cmd executed successfully")

  output := string(out[:])

  fmt.Println(output)

}
nicholasericksen commented 9 months ago

User could supply these in a seperate file and then parse them into various go routines and execute them. idk