Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nicholasericksen opened this issue Jan 1, 2024 · 1 comment
Open

Comments

@nicholasericksen
Copy link
Owner

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 nicholasericksen changed the title Handle multiple types of requests Allow for specifying Curl commands to run in go routines Jan 1, 2024
@nicholasericksen
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant