requester is the main function that runs all the tests.
(uri string, proxy string, userAgent string, reqHeaders []string, bypassIP string, folder string, method string, verbose bool, techniques []string, banner bool, rateLimit bool, timeout int, redirect bool, randomAgent bool)
| 4090 | |
| 4091 | // requester is the main function that runs all the tests. |
| 4092 | func requester(uri string, proxy string, userAgent string, reqHeaders []string, bypassIP string, folder string, method string, verbose bool, techniques []string, banner bool, rateLimit bool, timeout int, redirect bool, randomAgent bool) { |
| 4093 | setVerbose(verbose) |
| 4094 | setDefaultSc(0) |
| 4095 | setDefaultRespCl(0) |
| 4096 | setFragmentCl(0) |
| 4097 | |
| 4098 | // Validate URI before proceeding |
| 4099 | if err := validateURI(uri); err != nil { |
| 4100 | log.Printf("[!] %v", err) |
| 4101 | return |
| 4102 | } |
| 4103 | |
| 4104 | options := setupRequestOptions(uri, proxy, userAgent, reqHeaders, bypassIP, folder, method, verbose, techniques, banner, rateLimit, timeout, redirect, randomAgent) |
| 4105 | |
| 4106 | // Auto-add payload-position technique if positions were detected |
| 4107 | if len(options.payloadPositions) > 0 { |
| 4108 | hasTech := false |
| 4109 | for _, t := range options.techniques { |
| 4110 | if t == "payload-position" { |
| 4111 | hasTech = true |
| 4112 | break |
| 4113 | } |
| 4114 | } |
| 4115 | if !hasTech { |
| 4116 | options.techniques = append(options.techniques, "payload-position") |
| 4117 | } |
| 4118 | // Build clean URI with original values (no markers) for other techniques |
| 4119 | cleanURI := options.uriTemplate |
| 4120 | for i, val := range options.payloadPositions { |
| 4121 | cleanURI = strings.Replace(cleanURI, payloadPlaceholder(i), val, 1) |
| 4122 | } |
| 4123 | options.uri = cleanURI |
| 4124 | } |
| 4125 | |
| 4126 | resetMaps() |
| 4127 | |
| 4128 | if maxGoroutines > 100 { |
| 4129 | log.Printf("Warning: High number of goroutines (%d) may cause resource exhaustion.", maxGoroutines) |
| 4130 | } |
| 4131 | |
| 4132 | // Display configuration and perform auto-calibration |
| 4133 | showInfo(options) |
| 4134 | |
| 4135 | // Auto-calibrate with multi-sample tolerance |
| 4136 | if options.autocalibrate { |
| 4137 | avgCl, tolerance := runAutocalibrate(options) |
| 4138 | setDefaultCl(avgCl) |
| 4139 | setCalibTolerance(tolerance) |
| 4140 | } |
| 4141 | |
| 4142 | requestDefault(options) |
| 4143 | markTechniqueExecuted("default") |
| 4144 | executeTechniques(options) |
| 4145 | printSilentTechniqueSummary() |
| 4146 | printTopFindings(topLimit) |
| 4147 | } |
no test coverage detected