Skip to content

Instantly share code, notes, and snippets.

@Ice3man543
Last active July 27, 2018 14:23
Show Gist options
  • Save Ice3man543/d150e25980e8d3741b66b5c6567f8273 to your computer and use it in GitHub Desktop.
Save Ice3man543/d150e25980e8d3741b66b5c6567f8273 to your computer and use it in GitHub Desktop.

Revisions

  1. Ice3man543 revised this gist Jul 27, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion join.go
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ var parameterList []string

    func permuteUrls(host string) {
    for _, param := range parameterList {
    fmt.Printf("%s/?%s=[payload]\n", host, param)
    fmt.Printf("%s?%s=[payload]\n", host, param)
    }
    }

  2. Ice3man543 revised this gist Jul 27, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion join.go
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ var parameterList []string

    func permuteUrls(host string) {
    for _, param := range parameterList {
    fmt.Printf("%s/?%s=[payload]", host, param)
    fmt.Printf("%s/?%s=[payload]\n", host, param)
    }
    }

  3. Ice3man543 created this gist Jul 27, 2018.
    41 changes: 41 additions & 0 deletions join.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    package main

    import (
    "bufio"
    "fmt"
    "os"
    )

    var parameterList []string

    func permuteUrls(host string) {
    for _, param := range parameterList {
    fmt.Printf("%s/?%s=[payload]", host, param)
    }
    }

    // Usage; ./join <list of urls> <list of get params>
    func main() {
    paramhandle, err := os.Open(os.Args[2])
    if err != nil {
    panic(err)
    }

    defer paramhandle.Close()
    paramScanner := bufio.NewScanner(paramhandle)
    for paramScanner.Scan() {
    parameterList = append(parameterList, paramScanner.Text())
    }

    fileHandle, err := os.Open(os.Args[1])
    if err != nil {
    panic(err)
    }

    defer fileHandle.Close()
    fileScanner := bufio.NewScanner(fileHandle)

    for fileScanner.Scan() {
    permuteUrls(fileScanner.Text())
    }
    }