How can I spoof the sender IP address using curl?

前端 未结 3 1877
面向向阳花
面向向阳花 2020-12-08 00:31

I need to make a request with a spoofed IP address for testing purposes. What\'s the easiest way to do this?

3条回答
  •  無奈伤痛
    2020-12-08 00:50

    Can I make libcurl fake or hide my real IP address?

    No. libcurl operates on a higher level. Besides, faking IP address would imply sending IP packet with a made-up source address, and then you normally get a problem with receiving the packet sent back as they would then not be routed to you!

    If you use a proxy to access remote sites, the sites will not see your local IP address but instead the address of the proxy.

    Also note that on many networks NATs or other IP-munging techniques are used that makes you see and use a different IP address locally than what the remote server will see you coming from.

提交回复
热议问题