使用Python wifi modu时出错

2024-06-16 14:37:04 发布

您现在位置:Python中文网/ 问答频道 /正文

When i try to run the scan operation using the wifi library as mentioned in the documentation, i get the following error.

 (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

Tags: theinpyscanbinliblinecell
1条回答
网友
1楼 · 发布于 2024-06-16 14:37:04

我想这个python wifi库在mac上不起作用。在

另一种方法是使用mac自带的叫做airports的工具进行wifi扫描。在

要开始使用该工具-

$ cd /usr/sbin
$ sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

机场-I标志很有用

同样,只需输入机场,就可以打开部分明确的手册页面

参考链接-Airports Example

相关问题 更多 >