Comments (9)
Hey! Thanks for the bug report. I'm in the middle of finals, but I think I
could take a look at this after my tests.
-rocky
2014年7月1日 下午8:10于 "Jacek Smit" [email protected]写道:
I'm using RAlink device, Right now i'm at school with a lot of wifi spots
with 802.1x authentication.And i'm getting these results after a scan.
wifi -i ra0 scanTraceback (most recent call last):
File "/usr/local/bin/wifi", line 5, in
pkg_resources.run_script('wifi==1.0.0', 'wifi')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/EGG-INFO/scripts/wifi", line 202, in
args.func(args)
File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/EGG-INFO/scripts/wifi", line 51, in scan_command
print_table([[cell.signal, cell.ssid, 'protected' if cell.encrypted else 'unprotected'] for cell in Cell.all(args.interface)])
File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/wifi/scan.py", line 34, in all
cells = map(Cell.from_string, cells_re.split(iwlist_scan)[1:])
File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/wifi/scan.py", line 44, in from_string
return normalize(cell_string)
File "/usr/local/lib/python2.7/dist-packages/wifi-1.0.0-py2.7.egg/wifi/scan.py", line 116, in normalize
while lines[0].startswith(' ' * 10):
IndexError: list index out of rangeResults of a iwlist ra0 scan
ra0 Scan completed :
Cell 01 - Address: 50:06:04:C3:4D:90
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality=94/100 Signal level=-53 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 02 - Address: 50:06:04:C3:4D:92
Protocol:11g/n BW20
ESSID:"eduroam"
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality=94/100 Signal level=-53 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 03 - Address: 50:06:04:C3:4D:91
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality=89/100 Signal level=-55 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 04 - Address: 50:06:04:C3:4D:93
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality=94/100 Signal level=-53 dBm Noise level=-92 dBm
Encryption key:off
Bit Rates:144 Mb/s
Cell 05 - Address: 50:06:04:BB:BD:D2
Protocol:11g/n BW20
ESSID:"eduroam"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=42/100 Signal level=-73 dBm Noise level=-78 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 06 - Address: 50:06:04:BB:BD:D0
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=52/100 Signal level=-69 dBm Noise level=-92 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 07 - Address: 50:06:04:C3:40:F3
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality=47/100 Signal level=-71 dBm Noise level=-75 dBm
Encryption key:off
Bit Rates:144 Mb/s
Cell 08 - Address: 50:06:04:C3:40:F2
Protocol:11g/n BW20
ESSID:"eduroam"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality=47/100 Signal level=-71 dBm Noise level=-76 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 09 - Address: 50:06:04:BB:BD:D3
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=42/100 Signal level=-73 dBm Noise level=-80 dBm
Encryption key:off
Bit Rates:144 Mb/s
Cell 10 - Address: 50:06:04:BB:BD:D1
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=42/100 Signal level=-73 dBm Noise level=-78 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 11 - Address: 50:06:04:C3:40:F0
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality=47/100 Signal level=-71 dBm Noise level=-76 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x
Cell 12 - Address: 50:06:04:C3:40:F1
Protocol:11g/n BW20
ESSID:""
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality=42/100 Signal level=-73 dBm Noise level=-77 dBm
Encryption key:on
Bit Rates:144 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : 802.1x—
Reply to this email directly or view it on GitHub
#42.
from wifi.
Hi @jargij,
I have finally had some free time to work on this. I fixed the bug in 22c10be and have released a new version of wifi (https://pypi.python.org/pypi/wifi/0.3.2).
I'm really sorry that it took so long to get to. I have been travelling lately and just haven't had the time to get around to it. I hope it's not too late.
from wifi.
I'm going to go ahead and close this bug out. Please reopen it if you run into any more problems.
from wifi.
I'm still getting this error.
from wifi.
Hi, can you try wifi 0.3.7? Thanks
from wifi.
No change. Offending iwlist output:
wlan0 Scan completed :
Cell 01 - Address: 8C:04:FF:B9:9F:70
ESSID:"vnet-6628E6"
Mode:Managed
Frequency:2.412 GHz (Channel 1)
Quality:5/5 Signal level:2/56 Noise level:164/56
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Cell 02 - Address: F8:D1:11:64:EF:04
ESSID:"mefisto"
Mode:Managed
Frequency:2.422 GHz (Channel 3)
Quality:5/5 Signal level:-38 dBm Noise level:-92 dBm
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: DD990050F204104A0001101044000101103B0001031047001000000000000010000000F8D11164EF101021000754502D4C494E4B10230009544C2D57523734304E10240003342E3010420003312E301054000800060050F204000110110019576972656C65737320526F7574657220544C2D57523734304E100800020086103C000101104900140024E26002000101600000020001600100020001
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Cell 03 - Address: 74:85:2A:00:A6:35
ESSID:"vnet-0C8196"
Mode:Managed
Frequency:2.422 GHz (Channel 3)
Quality:2/5 Signal level:-74 dBm Noise level:-92 dBm
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: DD790050F204104A0001101044000102103B00010310470010D96C7EFC2F8938F1EFBD6E5148BFA81210210005436973636F10230005436973636F1024000631323334353610420007303030303030311054000800060050F204000110110006306338313936100800022008103C0001011049000600372A000120
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Cell 04 - Address: D0:03:4B:D8:7F:B6
ESSID:"citan"
Mode:Managed
Frequency:2.462 GHz (Channel 11)
Quality:5/5 Signal level:-12 dBm Noise level:-92 dBm
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Cell 05 - Address: B0:48:7A:B5:C5:5C
ESSID:"Gargoyle"
Mode:Managed
Frequency:2.442 GHz (Channel 7)
Quality:3/5 Signal level:-69 dBm Noise level:-92 dBm
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Cell 06 - Address: 00:12:17:D5:17:5F
ESSID:"327918.A2"
Mode:Managed
Frequency:2.484 GHz (Channel 14)
Quality:3/5 Signal level:-69 dBm Noise level:-92 dBm
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
from wifi.
wifi version 0.3.8, traceback:
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-8-cdc4f547803e> in <module>()
----> 1 cells = map(Cell.from_string, cells_re.split(s)[1:])
/home/jazg/v/coup/lib/python2.7/site-packages/wifi/scan.pyc in from_string(cls, cell_string)
52 object for it.
53 """
---> 54 return normalize(cell_string)
55
56 @classmethod
/home/jazg/v/coup/lib/python2.7/site-packages/wifi/scan.pyc in normalize(cell_block)
135 # different lines, sometimes...
136 if lines:
--> 137 while lines[0].startswith(' ' * 10):
138 values += lines.pop(0).strip().split('; ')
139
IndexError: list index out of range
from wifi.
Are you manually feeding the output of iwlist scan into the parser?
Does this happen from the CLI?
from wifi.
Yes, this time it was from manual feeding to get traceback output when I got IndexError from the application that uses wifi as library.
from wifi.
Related Issues (20)
- Request: Join open network HOT 1
- interfaces file keeps growing HOT 1
- Can't connect on Raspberry Pi (Jessie) HOT 15
- Scheme always uses dhcp HOT 3
- Networking breaks after attempting to connect to an AP with spaces in its name HOT 1
- schema with colons brakes the library
- iwlist need root privilege HOT 11
- Failed to read scan data : Argument list too long
- Scheme.Save() Fails HOT 2
- Not installing bash completion because of lack of permission
- Saving Schemes with the same ESSID
- Error with ifdown while activating the scheme. No such interface as 'wlan1' HOT 4
- scheme.activate() returns non zero exit status 1 HOT 2
- Breaks Nework Connections on Raspberry Pi (Raspbian stretch)
- /sbins/ifdown
- Minor detail but Cell.all returns map, not a list. Modify the docs
- scan command error HOT 11
- the problem for :q
- the problem for ver 0.3.8 HOT 7
- Retrieving protocol from scan HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifi.