Files
hadrian/proxychain/rqm/modify_domain_with_regex.go
2023-11-18 08:31:59 -06:00

14 lines
323 B
Go

package rqm // ReQuestModifier
import (
"ladder/proxychain"
"regexp"
)
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
}
}