Skip to content

Commit 7a80eea

Browse files
committed
V1.0.9
1 parent 4d7587a commit 7a80eea

6 files changed

Lines changed: 32 additions & 2 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ CONFIGURATIONS:
4949
-ct, -crawl-duration value maximum duration to crawl the target
5050
-hl, -headless Discover parameters with headless browser
5151
-H, -header "Name: Value" Header "Name: Value", separated by colon. Multiple -H flags are accepted.
52+
-X, -method string HTTP method to use (default "GET")
53+
-b, -body string POST data
5254
5355
OUTPUT:
5456
-o, -output string File to write output to (default "parameters.txt")
@@ -81,6 +83,12 @@ The URLs you provide might require a specific header to open or may return a dif
8183
fallparams -u "https://target.tld/profile/edit" -H "Cookie: auth=token" -H "Role: Admin"
8284
```
8385

86+
### POST data
87+
If your target responds differently when a POST request with a specific value is sent, you can execute the fallparams command using the following method:
88+
```bash
89+
fallparams -u "https://target.tld/path" -X POST -b "param=value" -H "Content-Type: application/x-www-form-urlencoded"
90+
```
91+
8492
### Headless
8593
Many modern websites utilize JavaScript to dynamically generate their DOM, leading to variations between HTTP responses and browser DOM. To bridge this disparity, employing the headless switch can be advantageous.
8694
```bash

funcs/active/request.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package active
22

33
import (
4+
"bytes"
45
"context"
56
"crypto/tls"
67
"github.com/ImAyrix/fallparams/funcs/opt"
@@ -18,7 +19,7 @@ func SendRequest(link string, myOptions *opt.Options) (*http.Response, string) {
1819
Timeout: 60 * time.Second,
1920
}
2021
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
21-
req, err := http.NewRequest("GET", link, nil)
22+
req, err := http.NewRequest(strings.ToUpper(myOptions.RequestHttpMethod), link, bytes.NewBuffer([]byte(myOptions.RequestBody)))
2223
if err != nil {
2324
return nil, "temp"
2425
}
@@ -28,6 +29,7 @@ func SendRequest(link string, myOptions *opt.Options) (*http.Response, string) {
2829
req.Header.Set("Sec-Fetch-Mode", "navigate")
2930
req.Header.Set("Sec-Fetch-Site", "none")
3031
req.Header.Set("Sec-Fetch-User", "?1")
32+
req.Header.Set("User-Agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0")
3133
req.Header.Set("Referer", link)
3234

3335
if len(myOptions.CustomHeaders) != 0 {

funcs/opt/options.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ type Options struct {
2020
MaxLength int
2121
MinLength int
2222
DisableUpdateCheck bool
23+
RequestHttpMethod string
24+
RequestBody string
2325
}

funcs/validate/options.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ func Options(options *opt.Options) error {
2121
if options.InputDIR != "" && options.CrawlMode {
2222
return errorutil.New("crawl mode (-crawl) and offline mode (-directory) cannot be used together")
2323
}
24+
if options.RequestHttpMethod != "" && options.CrawlMode {
25+
return errorutil.New("crawl mode (-crawl) and custom request method (-method) cannot be used together")
26+
}
27+
if options.RequestHttpMethod != "" && options.Headless {
28+
return errorutil.New("headless mode (-headless) and custom request method (-method) cannot be used together")
29+
}
30+
if options.RequestBody != "" && options.CrawlMode {
31+
return errorutil.New("crawl mode (-crawl) and custom request body (-body) cannot be used together")
32+
}
33+
if options.RequestHttpMethod != "" && options.Headless {
34+
return errorutil.New("headless mode (-headless) and custom request body (-body) cannot be used together")
35+
}
2436
if options.MaxLength <= 0 {
2537
return errorutil.New("the maximum length (-max-length) must be greater than 0.")
2638
}

funcs/validate/urls.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ func Clear(links []string) []string {
2222
}
2323
}
2424

25+
if !IsUrl(link) {
26+
isGoodUrl = false
27+
}
28+
2529
if isGoodUrl {
2630
result = append(result, link)
2731
}

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var (
1616
)
1717

1818
const (
19-
VERSION = "1.0.8"
19+
VERSION = "1.0.9"
2020
)
2121

2222
func ReadFlags() *goflags.FlagSet {
@@ -39,6 +39,8 @@ func ReadFlags() *goflags.FlagSet {
3939
flagSet.DurationVarP(&myOptions.CrawlDuration, "crawl-duration", "ct", 0, "maximum duration to crawl the target"),
4040
flagSet.BoolVarP(&myOptions.Headless, "headless", "hl", false, "Discover parameters with headless browser"),
4141
flagSet.VarP(&myOptions.CustomHeaders, "header", "H", "Header `\"Name: Value\"`, separated by colon. Multiple -H flags are accepted."),
42+
flagSet.StringVarP(&myOptions.RequestHttpMethod, "method", "X", "GET", "HTTP method to use"),
43+
flagSet.StringVarP(&myOptions.RequestBody, "body", "b", "", "POST data"),
4244
)
4345

4446
createGroup(flagSet, "output", "Output",

0 commit comments

Comments
 (0)