当我尝试使用文档中提到的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
答案 0 :(得分:0)
我认为这个python wifi库在mac上不起作用。
做wifi扫描的另一种方法是使用Mac中称为机场的工具。
开始使用该工具 -
$ cd /usr/sbin
$ sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
机场-I标志很有用
只需键入机场即可打开部分明确的手册页
参考链接 - Airports Example