Simple setting of wireless routes without logon-Practice

Source: Internet
Author: User

In the previous section, we introduced the importance of using command line commands to set up wireless routers and application sites. In addition, we also introduced the tool named CURL, you can transmit HTML language information in the command line, display all the page content of an address, and perform interactive transmission with the page parameters. Today, let's take a look at the variable names corresponding to each parameter in the wireless router and use CURL to modify the variable value in the command line, this allows you to set up a wireless router without logging on to the management interface.

1. Install httplook to find the variable name

As mentioned in the previous article and the beginning of this article, all the settings in the wireless router correspond to variable names, that is, when we modify a specific setting, the variable name value corresponding to this setting also changes. If we find out the variable name and use CURL to change its value, we can use the CURL command to complete the function of changing a configuration of the wireless router.

I have tried many sniffer tools, including the famous sniffer pro. However, most sniffer tools are monitored based on NICs. If you only want to monitor HTTP or browsers, it is a little useful.

Here I recommend httplook, a small and practical tool. We can find the variable names corresponding to each setting in the wireless router in the most convenient and convenient way. As the saying goes, httplook is more powerful and practical than any other sniffer in browser monitoring and HTTP traffic information.

Download httplook

Step 1: Download httplook and run its main program. The installation screen is displayed.

Step 2: Click NEXT, Select accept protocol, and click next to continue.

Step 3: Set the installation path, which is installed in c: \ program files \ httplook by default.

Step 4: After installation, select whether to add an icon to the desktop.

Step 5: all settings are complete. httplook has been deployed to our local hard disk.

Next, we will use httplook to analyze the variable names corresponding to each configuration parameter of the wireless router. At the same time, we will analyze the different key values of each variable name, find the real key value corresponding to the information we need to set.

2. Use httplook to find the variable name

It is very easy to use httplook to find the variable names corresponding to each parameter of the wireless router. First, open the httplook program.

Then, click the green arrow in the button above the main interface to let httplook start monitoring HTTP data traffic. After monitoring, we can open the browser to access the wireless router management interface and modify the corresponding Wireless Settings. After modification, return to httplook immediately and click "stop" to complete monitoring.

After the monitoring is stopped, we will see all the monitored information on the main interface of the httplook software. Here we will introduce you to some tips, that is, to close other useless browser windows before monitoring, only save the Broadband Router management interface window, go to the management interface, find the vro parameters you want to modify, and then start httplook for monitoring before you click Modify. Immediately disable monitoring after modification, the collected data packets are all about the management window, and few data packets are collected. Naturally, the actual variable names and values corresponding to this parameter can be analyzed more accurately and quickly.

Through the techniques described above, you can quickly find out the variable names and corresponding parameter values set for wireless routers. The author takes D-LINK + A as an example for monitoring. 7)

In, we can see POST/apply. cgi? FormWirelessSetup is actually the page for modifying the Wireless Parameters in the wireless router. The host address is 192.168.0.50 on the right of the software, the corresponding page is/apply. cgi? FormWirelessSetup, then the complete interface for calling Wireless settings in the wireless router is http: // 192.168.0.50/apply. cgi? FormWirelessSetup.

Next, we will analyze the variable names corresponding to each parameter in the wireless settings, at the bottom of the right, we can see in detail -- ssid0 = default & chan0 = 7 & authType = open & wepEnabled0 = OFF & length0 = 1 & format0 =
2 & defaultTxKeyId0 = 1 & key10 = *********** & key20 = ********** & key30 = ****** ****
& Amp; key40 = ********** & pskValue0 = & pskValueCfm0 = & pskFormat0 = 0 & radiusIP0 = &
Radiusp0 0 = 1812 & radiusPass0 = & radius2IP0 = & radius2Port0 = 1812 & radius2Pass0 = &
Submit-url = % 2Fh_wireless.sh.

The above code shows all the variable names set for the wireless router. Ssid0, chan0, and authtype. We can analyze the actual settings of these variable names. For example, the variable name corresponding to the ssid name is ssid0, and the variable name corresponding to the channel used for radio signal broadcast is chan0, the variable name corresponding to the encryption type of the wireless signal is authtype. We can further analyze other mappings.

So far, we have completed monitoring on all the wireless parameters set in the wireless router, and then we can use the CURL command to transmit the values corresponding to these variables, in this way, you can use commands to change the configurations of a wireless router.

3. Use the curl command to change the wireless router settings

As described in the previous article, we can use the CURL command to interact with HTTP pages to transmit information. After the above analysis we obtained in the D-LINK DWL-2000AP + a wireless router, using http: // 192.168.0.50/apply. cgi? The formWirelessSetup page calls all wireless settings, which requires user name and password verification.

In addition, each wireless setting on this page corresponds to a variable name. The variable name corresponding to the ssid name is ssid0, and the variable corresponding to the channel used for wireless signal broadcasting is chan0, the variable name corresponding to the encryption type of the wireless signal is authtype. We can further analyze other mappings. The value of these variable names can also be obtained through repeated monitoring and repeated settings.

The following is a simple example. For example, if you want to use the CURL command in the command line mode to change the radio signal transmission frequency band from 8 to 7, you must first analyze the variable name chan0 corresponding to the frequency band, the current value is chan0 = 8. The CURL command is as follows:

C: \ curl> curl-u admin: ""-d "chan0 = 7" http: // 192.168.0.50/apply. cgi? FormWirelessSetup
The admin after-u is the user name of the management account, and "" indicates that the password of the management account is blank, -d "chan0 = 7" indicates that the value of chan0 is set to 7, followed by http: // 192.168.0.50/apply. cgi? FormWirelessSetup is the call address.

Through the above settings, we have completed the operation of using the curl command in command line mode to change the wireless signal transmission frequency band of the wireless router from 8 to 7.

Iv. Batch Processing + scheduled tasks make operations more automated

Now that we know that we can use the CURL command to modify the wireless router settings, copy these commands to a text file, modify this file to a batch file ending with bat. Then, you can modify the configuration of the wireless router by running this batch file. If you are interested, you can combine the batch processing with the scheduled tasks in the operating system to automate the modification of the wireless router settings. Interested readers can study and operate on their own. The entire process is very simple and will not be detailed here.

V. Summary:

Using the curl command to quickly modify the wireless router settings is a new idea for configuring the wireless router, breaking the traditional method that can only change the parameters of the wireless router through the browser window, this method can greatly improve your work and learning efficiency for wireless routers that do not enable telnet or SNMP management.

To modify a variable, you must first modify the parameter repeatedly and use httplook for multiple monitoring times to obtain the variable name and variable values corresponding to various settings. Then, you can use the curl command to transmit the corresponding variables and corresponding key values.(

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.