tazpanel rev 481
Tiny edits
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sun May 10 11:51:03 2015 +0100 (2015-05-10) |
parents | d3e416b5fcfc |
children | b9e3c8ad454b |
files | README.devel |
line diff
1.1 --- a/README.devel Sun May 03 15:07:43 2015 +0200 1.2 +++ b/README.devel Sun May 10 11:51:03 2015 +0100 1.3 @@ -7,7 +7,7 @@ 1.4 ----------- 1.5 1.6 Goal: allow ANY symbols in the WPA PSK (Wi-Fi password). 1.7 -We can find WPA PSK in the different places, and there are different 1.8 +We can find WPA PSK in all the different places, and there are different 1.9 restrictions to write it. 1.10 1.11 a) /etc/network.conf: SliTaz system wide networking configuration; 1.12 @@ -15,17 +15,16 @@ 1.13 c) html input form in the TazPanel > Network > Wireless; 1.14 d) saved passwords for known networks in the javascript in the same place. 1.15 1.16 -Let's see all that files/places one by one. 1.17 +Let's see all those files/places one by one. 1.18 1.19 1.20 a) network.conf 1.21 1.22 -Really "network.conf" is a shell script. It contains variables definitions, and 1.23 -it sourced into other shell scripts to define all Wi-Fi configuration variables. 1.24 -By default, we can see variable and its content in the double quotes: 1.25 +Really "network.conf" is a shell script. It contains variables definitions and 1.26 +is sourced into other shell scripts to define all Wi-Fi configuration variables. 1.27 +By default, we can see variables and their contents in the double quotes: 1.28 1.29 WIFI_KEY="mypassword" 1.30 - 1.31 There are many pitfalls if we allow ANY symbols here: 1.32 1.33 Variable expansion: 1.34 @@ -39,13 +38,13 @@ 1.35 Quoting problem: 1.36 WIFI_KEY="abc"def'ghi" 1.37 1.38 -Seems, we'll solve the problem when escape some symbols: 1.39 +Seems, we'll solve the problem when escaping some symbols: 1.40 \ → \\ 1.41 " → \" 1.42 $ → \$ 1.43 ` → \` 1.44 1.45 -Another solution exists (and currently I stick to it): single quotes. We need no 1.46 +Another solution exists (and currently I stick to it): single quotes. We need not 1.47 escape anything but single quotes (') in the single quotes terminated string. 1.48 And yes, this quoting is a pain for brain: 1.49 1.50 @@ -56,10 +55,10 @@ 1.51 1.52 b) wpa.conf 1.53 1.54 -wpa_supplicant actually connects us to our Wi-Fi networks, and it is a file 1.55 +wpa_supplicant actually connects us to our Wi-Fi networks and it is a file 1.56 where we can store all our networks settings, including passwords. It is handy 1.57 when you have one network at home, other - at work, and another - at your 1.58 -friends home. Really, you shouldn't to re-enter all these passwords again. 1.59 +friends home. Really, you shouldn't need to re-enter all these passwords again. 1.60 1.61 We can read a lot of useful information in the wpa_supplicant.conf file 1.62 (/etc/wpa/wpa_supplicant.conf): 1.63 @@ -72,16 +71,16 @@ 1.64 # be used to indicate that the PSK/passphrase is stored in external storage. 1.65 # This field is not needed, if WPA-EAP is used. 1.66 # Note: Separate tool, wpa_passphrase, can be used to generate 256-bit keys 1.67 -# from ASCII passphrase. This process uses lot of CPU and wpa_supplicant 1.68 +# from ASCII passphrase. This process uses lots of CPU and wpa_supplicant 1.69 # startup and reconfiguration time can be optimized by generating the PSK only 1.70 # only when the passphrase or SSID has actually changed. 1.71 1.72 1.73 -Interesting and good method to use 64 symbols "passwords", maybe we switch to it 1.74 +Interesting and good method to use 64 symbols "passwords", maybe we can switch to it 1.75 sometimes. Example of using "wpa_passphrase": 1.76 -Let network name is: my_wifi 1.77 -Let password is : abc'def"ghi 1.78 -Let's run utility twice - with different quoting style: 1.79 +Let network name be: my_wifi 1.80 +Let password be : abc'def"ghi 1.81 +Let's run utility twice - with a different quoting style: 1.82 1.83 tux@slitaz:~$ wpa_passphrase my_wifi "abc'def\"ghi" 1.84 network={ 1.85 @@ -96,10 +95,10 @@ 1.86 psk=e99c121a998a0c35419b16fd56beb38d2b471fd5519518c056af933e9daf3e30 1.87 } 1.88 1.89 -Here psk are identical, so we can use this method. 1.90 +Here the psk are identical, so we can use this method. 1.91 1.92 But I can't find advanced info about quoting style in the wpa_supplicant 1.93 -configuration file. So, I ended with little experiment. I've created new 1.94 +configuration file. So, I ended with a little experiment. I've created a new 1.95 network connection in my Android smartphone and viewed my 1.96 /data/misc/wifi/wpa_supplicant.conf file using Root Explorer application: 1.97 1.98 @@ -110,9 +109,9 @@ 1.99 key_mgmt=WPA-PSK 1.100 } 1.101 1.102 -Yes, we can see unpaired quotes. Really don't know is it right. Maybe, 1.103 -wpa_supplicant just readed line content between first and last quotes. Need to 1.104 -dig into sources... And now I not quote psk in any manner. 1.105 +Yes, we can see unpaired quotes. Really I don't know if it is right. Maybe, 1.106 +wpa_supplicant just reads line content between first and last quotes. Need to 1.107 +dig into sources... And now I will not quote psk in any manner. 1.108 1.109 1.110 c) network.cgi form input 1.111 @@ -121,7 +120,7 @@ 1.112 1.113 <input type="password" name="password" value="$WIFI_KEY" id="password"/> 1.114 1.115 -Here we free to use single quotes or double quotes, but we should escape them 1.116 +Here we are free to use single quotes or double quotes, but we should escape them 1.117 in the html manner: 1.118 ' → ' 1.119 " → " 1.120 @@ -135,8 +134,8 @@ 1.121 d) network.cgi javascript database 1.122 1.123 Also, we store passwords in the known networks database in the form of 1.124 -javascript to gain user experience without page to be reloaded: you can click 1.125 -Wi-Fi network name and script will fill its password for you. 1.126 +javascript to gain user experience without pages having to be reloaded: you can click 1.127 +Wi-Fi network name and the script will fill its password for you. 1.128 1.129 Here example of that script on the html page: 1.130 1.131 @@ -150,7 +149,7 @@ 1.132 ]; 1.133 </script> 1.134 1.135 -Here we need to escape ('"&<>) symbols but in the slightly another manner: 1.136 +Here we need to escape ('"&<>) symbols but in another manner slightly: 1.137 \ → \\ 1.138 " → \" 1.139