Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Score crawl inputs by SSRF-prone field names and register ping-back canaries for operator paste confirmation.
18 lines
408 B
Go
18 lines
408 B
Go
package recon
|
|
|
|
import "strings"
|
|
|
|
func BuildSSRfCanaryURL(base, scanID string) string {
|
|
base = strings.TrimSpace(base)
|
|
if base == "" {
|
|
base = "https://localhost"
|
|
}
|
|
if strings.HasPrefix(base, "http://") {
|
|
base = "https://" + strings.TrimPrefix(base, "http://")
|
|
}
|
|
if !strings.HasPrefix(base, "https://") {
|
|
base = "https://" + base
|
|
}
|
|
return strings.TrimRight(base, "/") + "/recon/ping/" + scanID
|
|
}
|