The application is basically submitted. The daily task is to check the application status and view the traffic statistics on the homepage. Every time I saw one more us ip address, I was so excited and impatient: Oh, my teacher hasn't contacted me yet, is it because I'm not satisfied? Was the photo scared? Think about the psychology of other students.ProgramDisguise various American IP addresses to visit the home pages of other students to surprise them ~
At first, I tried to pretend to be an IP address by forging the IP Address Header, but it was a little difficult to think about it. Only Network-layer IP packets can be forged by forging the IP header, but the TCP/IP protocol requires three handshakes. The packets sent back from the server are routed to the wrong IP address. I cannot even see the server's hand, let alone handshaking. However, without receiving the server ack + Syn packet, it is impossible to complete three handshakes in disguise because the server SYN Packet serial number is unknown. If a certain test and prediction are made, it is possible to guess the server SYN Packet number under a certain probability, but the development cost is too high, so this solution only has to give up.
The idea that is easy to come up with is proxy. The good news is that the resources of the proxy on the Internet can be captured by others. Isn't it okay to write a small program and use the U.S. proxy to constantly visit the webpage of students? This idea is quite realistic. Start.
However, it is difficult to implement it using C. In C #, The webrequest class is the most likely to come up with network connection. It not only occupies a small amount of resources, but also comes with the proxy attribute, which can be directly specified. However, it is useless only after the program is written. The reason is that the traffic statistics generally use JavaScript scripts. You need to execute a short program to obtain system parameters such as the system version and browser version for statistics. However, webrequest only downloads the Javascript script and does not explain the execution, so it is useless.
To solve this problem, the intuitive idea is that the principle of traffic statistics must be to call some Web APIs. The purpose of JS scripts is to take parameters only, essentially, the operation is implemented by accessing a URL. I am not finishing webrequest for this URL. To obtain this URL, You need to analyze this Javascript script. Unfortunately, the cnzz script seems to have been obfuscated... I don't know much about JavaScript code. No way, I had to use my computer to calculate the results. Add an alert (result) to the end of the JS file and run it again to get an address. Then access this address. Alas... Still not responding...
Suddenly, why don't I simply run JS scripts in C # in some way? Stupid. Speed call the winform. webbrowser control. Success ~ Okay. It's a little small to write dozens of lines.CodeThis will surprise you ~
The following are some lessons:
1. C # is a silly language. When using C #, you should think in the order from advanced to low-level, and assign as many tasks as possible. net Framework.
2. Do not be impatient when writing a program. Step by step, confirm the success of step n before proceeding to step (n + 1. Otherwise, it will bring a lot of uncertainties to the debugging, and the speed will not reach.
3. When writing a program, we must ensure a sound and smooth information feedback mechanism to ensure that we know whether each step is successful. We cannot assume that a certain step is successful. Maybe this step is the obstacle that has not been found for a long time.
P.s. In fact, the useful proxy is still hard to find... Sigh...