Skip to content

Commit

Permalink
update fuzz syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
cfsdes committed Dec 19, 2023
1 parent f22697c commit 4b5c5e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions docs/plugins/fuzzers.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ matcher := detections.Matcher{
}

// Using fuzzer
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.Fuzz<TYPE>(r, client, payloads, matcher)
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.Fuzz<TYPE>(r, client, pluginDir, payloads, matcher)
```


Expand All @@ -69,35 +69,35 @@ found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.Fuzz<TYPE>(r, c

```go
payloads := []string{"'", "1 OR 1=1"}
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzQuery(r, client, payloads, matcher)
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzQuery(r, client, pluginDir, payloads, matcher)
```

### Fuzzing FormData

```go
payloads := []string{"'", "1 OR 1=1"}
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzFormData(r, client, payloads, matcher)
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzFormData(r, client, pluginDir, payloads, matcher)
```

### Fuzzing JSON

```go
payloads := []string{"'", "1 OR 1=1"}
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzJSON(r, client, payloads, matcher)
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzJSON(r, client, pluginDir, payloads, matcher)
```

### Fuzzing XML

```go
payloads := []string{"'", "1 OR 1=1"}
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzXML(r, client, payloads, matcher)
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzXML(r, client, pluginDir, payloads, matcher)
```

### All fuzzers at once

```go
payloads := []string{"'", "1 OR 1=1"}
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzAll(r, client, payloads, matcher)
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzAll(r, client, pluginDir, payloads, matcher)
```

## Special Fuzzers
Expand All @@ -106,15 +106,15 @@ found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzAll(r, clie
```go
payloads := []string{"'", "1 OR 1=1"}
headers := []string{"User-Agent","Referer"}
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzHeaders(r, client, payloads, headers, matcher, "all")
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzHeaders(r, client, pluginDir, payloads, headers, matcher, "all")
```
> The last argument can be "all" or "". If "all", the payload will be added to all headers at once and sent in a single request.
### Fuzzing Path

```go
payloads := []string{"'", "1 OR 1=1"}
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzPath(r, client, payloads, matcher, "last")
found, url, payload, param, rawReq, rawResp, logsScan := fuzzers.FuzzPath(r, client, pluginDir, payloads, matcher, "last")
```
> The last argument can be "last" or "*". If last, only the last path will be fuzzed, else all paths will be fuzzed.
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/plugin-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func Run(r *http.Request, client *http.Client, pluginDir string) (
}

// Running All Fuzzers
found, url, payload, param, rawReq, rawResp, _ = fuzzers.FuzzAll(r, client, payloads, matcher)
found, url, payload, param, rawReq, rawResp, _ = fuzzers.FuzzAll(r, client, pluginDir, payloads, matcher)
return
}
Expand Down

0 comments on commit 4b5c5e5

Please sign in to comment.