Files
hadrian/proxychain/requestmodifiers/modify_domain_with_regex.go
2023-12-03 17:04:30 -06:00

15 lines
318 B
Go

package requestmodifiers
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
}
}