Files
hadrian/proxychain/requestmodifiers/spoof_x_forwarded_for.go
2023-12-08 09:26:26 +01:00

15 lines
389 B
Go

package requestmodifiers
import (
"github.com/everywall/ladder/proxychain"
)
// SpoofXForwardedFor modifies the X-Forwarded-For header
// in some cases, a forward proxy may interpret this as the source IP
func SpoofXForwardedFor(ip string) proxychain.RequestModification {
return func(px *proxychain.ProxyChain) error {
px.Request.Header.Set("X-FORWARDED-FOR", ip)
return nil
}
}