首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Python wifi模块时出错

使用Python wifi模块时出错
EN

Stack Overflow用户
提问于 2015-06-15 19:56:36
回答 1查看 462关注 0票数 0

当我试图使用文档中提到的wifi库运行扫描操作时,我会得到以下错误。

代码语言:javascript
复制
 (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
EN

回答 1

Stack Overflow用户

发布于 2015-07-02 04:39:02

我认为这个python库在mac上不起作用。

另一种做wifi扫描的方法是使用mac中的一个叫做机场的工具。

开始使用这个工具-

代码语言:javascript
复制
$ cd /usr/sbin
$ sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

机场-I标志很有用

此外,只要输入机场,就会打开部分明确的手册页面。

参考链接- 机场实例

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30853896

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档