C # Use HttpWebRequest to simulate a fake IP address to forge an ip address,

Source: Internet
Author: User

C # Use HttpWebRequest to simulate a fake IP address to forge an ip address,

Some people may say that IP address verification is completed at the TCP layer, rather than at the HTTP layer. If an IP address is forged, the three-way handshake of TCP may fail. What I am talking about here is not a completely meaning forgery. If you use a transparent proxy to access the Internet, the HTTP request sent by the transparent proxy to the server will contain x-forward-for information. Example: X-Forwarded-For: 162.150.10.16
Therefore, you only need to add X-Forwarded-For: 162.150.10.16 to the http request sent to the server.
For example, the following request:
GET http://www.ahjinzhai.gov.cn/sdyxnx/vote.php? Id = 1 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd. ms-excel, application/vnd. ms-powerpoint, application/msword ,*/*
Referer: http://www.ahjinzhai.gov.cn/sdyxnx/
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; TencentTraveler)
Host: www.ahjinzhai.gov.cn
Cookie: PHPSESSID = 1847fc15020bc16b47ce250f457daab4
Cache-Control: no-cache
X-Forwarded-For: 162.150.10.16
Pragma: no-cache

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.