使用wifi
包,这就是我所做的:
>>> cell = Cell.all('wlan0')[0]
>>> print cell
>>> scheme = Scheme.for_cell('wlan0', 'home', cell)
当我打印单元格时,它会打印ssid。当我运行scheme = Scheme.for_cell('wlan0', 'home', cell)
时。它给出了错误
>>> scheme = Scheme.for_cell('wlan0', 'home', cell)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/aaeronn/virt_proj/wifi_hack/local/lib/python2.7/site-packages/wifi/scheme.py", line 110, in for_cell
return cls(interface, name, configuration(cell, passkey))
File "/home/aaeronn/virt_proj/wifi_hack/local/lib/python2.7/site-packages/wifi/scheme.py", line 23, in configuration
if len(passkey) != 64:
TypeError: object of type 'NoneType' has no len()
什么错了?我应该在哪里输入该ssid的密码?
答案 0 :(得分:0)
documentation for wifi.Scheme.for_cell
表示需要passkey
参数:
classmethod
for_cell
(接口,名称,单元格,密钥=无)
对于某些passkey
,您可以调用
scheme = Scheme.for_cell('wlan0', 'home', cell, passkey)
看source code for that package,TypeError
提出了一个错误,或者至少是仓促设计的迹象。