Files
hadrian/proxychain/requestmodifers/modify_domain_with_regex.go
2023-11-27 12:00:12 -06:00

15 lines
317 B
Go

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