当我试图使用文档中提到的wifi库运行扫描操作时,我会得到以下错误。
(lsbaws)Keshav:bin root# wifi scan
Traceback (most recent call last):
File "/Users/Keshav/Documents/Github/Webserver/webserver/lsbaws/bin/wifi", line 202, in <module>
args.func(args)
File "/Users/Keshav/Documents/Github/Webserver/webserver/lsbaws/bin/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 "/Users/Keshav/Documents/Github/Webserver/webserver/lsbaws/lib/python2.7/site-packages/wifi/scan.py", line 29, in all
stderr=subprocess.STDOUT)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 709, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1326, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory发布于 2015-07-02 04:39:02
我认为这个python库在mac上不起作用。
另一种做wifi扫描的方法是使用mac中的一个叫做机场的工具。
开始使用这个工具-
$ cd /usr/sbin
$ sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport机场-I标志很有用
此外,只要输入机场,就会打开部分明确的手册页面。
参考链接- 机场实例
https://stackoverflow.com/questions/30853896
复制相似问题