Files
hadrian/proxychain/requestmodifers/modify_path_with_regex.go
2023-11-19 15:03:11 -06:00

14 lines
314 B
Go

package requestmodifers
import (
"ladder/proxychain"
"regexp"
)
func ModifyPathWithRegex(match regexp.Regexp, replacement string) proxychain.RequestModification {
return func(px *proxychain.ProxyChain) error {
px.Request.URL.Path = match.ReplaceAllString(px.Request.URL.Path, replacement)
return nil
}
}