wireshark error: There are no interfaces on which a capture can be done.
来源:互联网 发布:oracle sql截取字符串 编辑:程序博客网 时间:2024/05/22 06:48
一、Linux环境:
1、root用户启动
01、启动一个shell
02、sudo wireshark (需要root权限)
2、普通用户启动
从Linux中第一次启动Wireshark的时候,可能会觉得奇怪,为什么看不到任何一个网卡,比如eth0之类的。这是因为,直接访问这些设备 需要 root权限。然后,我就用root权限去用了。当然,这是一个不好的做法。比如Gentoo中就会提示:WIRESHARK CONTAINS OVER ONE POINT FIVE MILLION LINES OF SOURCE CODE. DO NOT RUN THEM AS ROOT.
那怎么办呢?Wireshark的leader Gerald Combs指出,现在多数Linux发行版都开始实现对raw网络设备使用文件系统 权限(能力) ,可以用这个途径从普通用户启动Wireshark。
以下是具体步骤:
1.安装setcap。setcap 是libcap2-bin包的一部分,一般来说,这个包默认会已经装好。
sudo apt-get install libcap2-bin
2.创建Wireshark组。这一步在安装Wireshark的时候,也会完成。
$ sudo -s
# groupadd -g wireshark
# usermod -a -G wireshark <自己的用户名>
# chgrp wireshark /usr/bin/dumpcap
# chmod 4750 /usr/bin/dumpcap
3.赋予权限。
#setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap 完成。
可以使用 getcap /usr/bin/dumpcap验证,输出应当是:/usr/bin/dumpcap = cap_net_admin,cap_net_raw+eip
现在就可以从自己的普通用户启动Wireshark抓包了。
二、Windows7的环境:
1、root用户启动
01、启动一个shell
02、sudo wireshark (需要root权限)
2、普通用户启动
从Linux中第一次启动Wireshark的时候,可能会觉得奇怪,为什么看不到任何一个网卡,比如eth0之类的。这是因为,直接访问这些设备 需要 root权限。然后,我就用root权限去用了。当然,这是一个不好的做法。比如Gentoo中就会提示:WIRESHARK CONTAINS OVER ONE POINT FIVE MILLION LINES OF SOURCE CODE. DO NOT RUN THEM AS ROOT.
那怎么办呢?Wireshark的leader Gerald Combs指出,现在多数Linux发行版都开始实现对raw网络设备使用文件系统 权限(能力) ,可以用这个途径从普通用户启动Wireshark。
以下是具体步骤:
1.安装setcap。setcap 是libcap2-bin包的一部分,一般来说,这个包默认会已经装好。
sudo apt-get install libcap2-bin
2.创建Wireshark组。这一步在安装Wireshark的时候,也会完成。
$ sudo -s
# groupadd -g wireshark
# usermod -a -G wireshark <自己的用户名>
# chgrp wireshark /usr/bin/dumpcap
# chmod 4750 /usr/bin/dumpcap
3.赋予权限。
#setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap 完成。
可以使用 getcap /usr/bin/dumpcap验证,输出应当是:/usr/bin/dumpcap = cap_net_admin,cap_net_raw+eip
现在就可以从自己的普通用户启动Wireshark抓包了。
二、Windows7的环境:
这个错误是因为系统没有启动NPF服务造成的。
解决的办法很简单:
01、在【开始】–>【运行】
02、输入:【%windir%/system32】
03、将会开启一个文件夹窗口,在里面找到CMD.EXE
04、点击右键,选择【以管理员身份运行】
05、选择【是】,输入【net start npf】
06、系统提示【NetGroup Packet Filter Driver 服务已经启动成功。】
07、至此,Wireshark再点击【Interfaces list】就可以正常选择需要捕捉的接口了。
08、如果需要关闭此服务,是要在命令行输入【net stop npf】即可。
转自:http://blog.csdn.net/prince_jun/article/details/11356255
0 0
- wireshark error: There are no interfaces on which a capture can be done.
- wireshark error: There are no interfaces on which a capture can be done.
- wireshark error: There are no interfaces on which a capture can be done.
- wireshark error: There are no interfaces on which a capture can be done.
- wireshark error: There are no interfaces on which a capture can be done.
- 【wireshark】wireshark 出现There are no interfaces on which a capture can be done.的解决方法
- ubuntu/wireshark: There are no interfaces on which a capture can be done.故障解决
- wireshark: There are no interfaces on which a capture can be done.故障解决
- Wireshark的NPF driver,There are no interfaces on which a capture can be done 问题
- ubuntu/wireshark: There are no interfaces on which a capture can be done.故障解决
- Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ”
- (转)Wireshark提示There are no interfaces on which a capture can be done.
- Wireshark - There are no interfaces on which a capture can be done
- wireshark抓包提示There are no interfaces on which a capture can be done
- mac下wireshark出现There are no interfaces on which a capture can be done.
- WIN7 Wireshark: There are no interfaces on which a capture can be done
- [Win8]Wireshark: There are no interfaces on which a capture can be done
- WIN7 Wireshark: There are no interfaces on which a capture can be done
- poj【数论/组合/博弈论】题目列表
- Lua与C/C++的交互1:C/C++与Lua最简单的互动
- DSR中使用到的主要数据结构
- Java加密技术(一)——BASE64与单向加密算法MD5&SHA&MAC
- OJ刷题之分数序列
- wireshark error: There are no interfaces on which a capture can be done.
- MFC中获得系统时间的方法
- 多项式加法
- C语言学习入门 (九) typedef 关键字
- [leetcode]Binary Tree Preorder Traversal
- 再探扩展欧几里得算法的应用
- Java关键字this、super使用总结
- MySQL存储过程
- Unity的Profiler性能分析