Because of the lab's project requirements, we know that we need to dynamically control the routing configuration information. After routing requires purchase of access, the http://192.168.1.1 routing Configuration page is available. Configuration, no need to manual operation. Even when scheduled tasks are configured, it is necessary to further investigate the operation of the routing configuration.
Need to achieve the goal is like some merchants to provide a Web-certified WiFi service, such as CMCC access to the airport, you do not connect to the Internet after the WiFi hotspot, he will take the initiative to jump to the Web Certification page implementation certification. After the ability to achieve Internet access. However, we hope that through the server host self-change to join the Web authentication account, such as the merchant can issue free Internet e-coupons, coupons above the corresponding account. Assuming a lot of words, it is very troublesome to join the configuration by hand.
It is extremely convenient to assume that the computer can be processed in batches.
Following according to the actual program process and some problems encountered in the process of httplook crawl descriptive narrative, I hope to encounter this problem in the future have some help. Previously there were two sets of scenarios:
1, the use of Wiwiz to build Web authentication , and through its Wiwiz Auth API access control. The references are as follows:
Low-cost hotel wireless WiFi network coverage +web Certification Scheme;
Wiwiz Auth API Reference manual and interface specification;
But 、、、 later found that Wiwiz seemingly free version of the service provided is really very little! Pay talent to meet the requirements of the project, so the method as an alternative!
2, with the Web certification of No Line , after the investigation found that there is a Web-certified wireless routing, I chose Lei ke nr235w wireless internet management router.
By the way, in the end of July in a east buy ¥ 219.00, these days again see is ¥129.00 (Price reduction notice) ... Fortunately, not to spend their own money, or loss of death.
(Can be ignored by The spit Groove)
Now to enter the focus, how to host side with some interface to the active completion of the routing configuration, the following find a very long time to find a better method:
Teaches you to easily play with the command line broadband routing (above). Teaches you to use the command line to easily play with the broadband routing (middle) then the dead and alive can not find the (bottom) section.
。。 Learn wildest to get. Finally, after flipping through a lot of pages, I found "master Taoist. You can easily use the command line to play broadband routing." Can the name be harmonized with the canonical point? And in the same site is not a continuous article, so can find the last article is also lucky.
One, Curl tool : Curl is a tool that uses URL syntax to transfer files, supports http/https/FTP/ftps/dict/telnet/ldap/file and Gopher and other protocols, the same time also has a relatively high security. This means that we can use the Curl command to achieve the HTTP protocol based on the page interaction.
So just what the browser can do, we just have to do it with curl simulation. Similarly, for some pages need to rob the ticket brush page. can also be controlled using the Curl command. But now after brushing the ticket system will always pop up need to manually enter the random verification code. Also as a means to prevent such cheating behavior. It is recommended that the current path of the Curl tool be added to the system path path after download. Then the confidence command line will not have to go into the corresponding path of curl ability to run. The system will voluntarily go to the environment variables path path to receive the command line commands you entered and run.
second, monitoring tools: in order to simulate the browser action, then we need to know the browser access to the address and the corresponding parameter settings.
Then two monitoring tools to crawl the page information parameters.
Problems such as the following are encountered:
1, with Httplook to crawl, just to start the crawl, my IE will crash. But with the Sogou browser can only catch the normal page, and cannot grasp the routing configuration page information.
2, try sniffer tool to crawl. able to catch. But because the information is not copied, or only can copy its ASCII code, but also to transcode it. So I just hit it with the number of my hands. However, when using these captured information for command line configuration, the computer often crashes.
It turns out that. The computer's very many encoded forms present a visualization that is not what is seen in that way. In addition to some similar characters, there are small details including half-width or full-width.
So the transfer of this information may be copied and pasted directly. Otherwise, I don't know what's going on.
At the beginning I thought it was a computer hardware or system problems, do not give up trying to stop, and then just keep on the crash restart. Almost re-installed the system.
Finally hold the mentality of a try. Uninstall IE reinstall the reload, and then retry with Httplook. Actually caught, really have a kind of steady feeling.
For the browser's very many operations, with IE certainly is correct. As many browsers today do not use IE cores. Very much is only compatible. So there will be such or such inexplicable error. And very many times you clearly according to what others say, can often appear with other people describe the different results of the narrative, that must be a reason. Each small step can fail.
Let's say you can analyze the steps from start to finish, and each step tries to do a trial-and-error scenario. The final solution is, of course, very good, assuming that the attempt can be thought out entirely. All the information can not be solved. That can only be said to be the fate of ... But in this process. Just want to finish, you can't stop trying!
!
! A stop you lose, of course, sometimes stop after the look, may be very easy to solve, but can not completely give up!
Now it's about to start crawling into the information section, which I'm going to go through on my own web-certified, non-route-by-line process.
(i), start Httplook: Click the green arrow to start the crawl, for example:
(b), browser operation: use IE to open the Routing configuration page and do the configuration you want to do, I would like to join the Web authentication account, for example, to:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvd2f5y2fpcwk=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
Upon successful joining we can see the newly added account on the Web Authentication page:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvd2f5y2fpcwk=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
(iii), Httplook get configuration Parameters : We'll press the Green arrow to the right. The first adjacent red button stops the crawl, and we can see the relevant information Httplook caught:
The ability to see the browser configuration route is by visiting the "192.167.1.1//router/l7_web_auth_user_set. CGI" Profile of the route using the Post method, and then post the following for example: "action=0& Enable=1&user=0&pass=0&name=&policy_group_id=&charge_mode=0&adv_type=0&auth_user_ Bind_mac_mode=0&auth_user_bind_mac=&count=1&idle_cut=1&auth_user_static_ip=&id=&deal= Add ", in which we notice that" user=0&pass=0 "is the account name and password that we have just set up to enter the account.
(four), Curl command line run: after the crawl, you need to use the Curl Tool command line call implementation.
By querying the usage of curl. We know the format for visiting the page with username and password, such as the following (that is, the username and password entered when we get access to the routing configuration page) are:curl-u Visit page username:password-d "parameters" http page address . Very much access to the Routing page username and password The default is "admin" or "guest" can also change their own. Both native username and password are "guest". Use for example the following:
Curl-u guest:guest-d "Action=0&enable=1&user=123&pass=123&name=&policy_group_id=&charge_ mode=0&adv_type=0&auth_user_bind_mac_mode=0&auth_user_bind_mac=&count=1&idle_cut=1& Auth_user_static_ip=&id=&deal=add "http://192.168.1.1/router/l7_web_auth_user_set.cgi
By executing the commands on the command line execution form, you can see, for example, the following information, stating that the configuration was successful:
At this time then look at the list of Web accounts in the routing configuration page. Username and password are "123" accounts were added to the. Similarly. Assuming that you want to do something related to other pages, you can take the same method as above. So far. We are done with the Curl command to run the routing configuration. Assuming you want to control a wireless WiFi hotspot, you can also write the command as a ". bat" file, and then set the Timer task function on the system to turn the hotspot on and off regularly. Suppose I need to add the same batch of Web authentication account as above, and I can call this command in other languages, just change the corresponding user and pass parameters.
Only the browser can do, the above approach can be done. The key is to "catch". When we encounter problems in the knowledge base we can contact (including their own knowledge, the surrounding cattle resources, the vast amount of information on the Internet, cattle resources) to query the solution. When you don't have a predetermined effect, try to make a mistake in all the steps, whether you know the reason or not. Even after you have successfully solved it, you don't know why, but you can't stop trying in the process.
And a lot of people can go through the program without the same problems as you do, do not complain about the injustice of fate, the emergence of something must have his reasons.
Maybe you can not know the reason now. But can't stop trying the pace.
Because of a stop. You'll lose. As for the results, it depends on your own ability 、、、 and "The Edge"!
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
You may not know the reason, but we can't stop trying. Httplook Crawl Routing Configuration Interface information