refactor wip
This commit is contained in:
14
proxychain/requestmodifers/spoof_x_forwarded_for.go
Normal file
14
proxychain/requestmodifers/spoof_x_forwarded_for.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package requestmodifers
|
||||
|
||||
import (
|
||||
"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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user