一、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的环境:
这个错误是因为系统没有启动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】即可。

wireshark error: There are no interfaces on which a capture can be done.的更多相关文章

  1. 【转】[fix] Wireshark error: There are no interfaces on which a capture can be done. on Mac OS X

    I got the following error message when trying to open a network interface for capture using Wireshar ...

  2. Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ”

    Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ” 解决方法: 今天在电脑上安装了WIR ...

  3. WIN7 Wireshark: There are no interfaces on which a capture can be done

    有的时候我们在Windows7的环境下使用Wireshark的时候,比如点击[Interface List]的时候,出现错误. 错误内容如下: There are no interfaces on w ...

  4. ubuntu/wireshark: There are no interfaces on which a capture can be done.故障解决

    [转载]http://blog.csdn.net/ccwwff/article/details/6697258 在ubuntu安装wireshark, 在启动程序启动wireshark. 点captr ...

  5. There are no interfaces on which a capture can be done.

    There are no interfaces on which a capture can be done. 今天启动了Wireshark 但是提示→There are no interfaces ...

  6. 【wireshark】打开后显示There are no interfaces on which a capture can be done

    解决方式:用管理员方式打开wireshark即可

  7. 【转】Wireshark:“There are no interfaces on which a capture can be done ”

    linux环境下 两种解决方案:    第一种方法:使用root用户登陆        xiaoshancun@xiaoshancun-VM500:~$ sudo wireshark    第二种方法 ...

  8. wireshark: there are no interfaces on which a capture can be done

    权限问题,简单的直接sudo就行. 更安全的做法是: # chmod 4755 /usr/bin/dumpcap dumpcap的所在目录可用whereis命令查看.

  9. centos wireshark

    root安装: yum install wireshark yum install wireshark-gnome wireshark error: There are no interfaces o ...

随机推荐

  1. HDUOJ---2110

    Crisis of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tot ...

  2. iOS 9 适配中出现的坑

    整理 iOS 9 适配中出现的坑(图文) 2015-10-22 iOS开发 库克表示:“现在在中国有150多万的开发者在iOS当中开发应用程序,我们鼓励更多的人开发应用程序,也鼓励更多的创业加入.” ...

  3. php 内存管理

    内存是计算机⾮常关键的部件之⼀,是暂时存储程序以及数据的空间,CPU只有有限的寄存器可以⽤于存储计算数据,⽽⼤部分的数据都是存储在内存中的,程序运⾏都是在内存中进⾏的.和CPU计算能⼒⼀样, 内存也是 ...

  4. POJ 1836 Alignment (双向DP)

    Alignment Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 10804   Accepted: 3464 Descri ...

  5. Python max() 函数

    描述 max() 函数返回给定参数的最大值,参数可以为序列. 语法 以下是 max() 函数的语法: max( x, y, z, .... ) 参数 x -- 数值表达式. y -- 数值表达式. z ...

  6. SQL Server 异常处理机制(Begin try Begin Catch) 摘录

    begin try --SQL end try begin catch --sql (处理出错动作) end catch 我们将可能会出错的sql 写在begin try...end try 之间,若 ...

  7. Mac 开发者设置强迫症

    Latest commit 2461787 on Mar 1 原文链接 强迫症的 Mac 设置指南 如何配置一个高效的 Mac 工作环境 English Version Table of Conten ...

  8. 深入浅出Node.js--数据通讯,NET模块运行机制

    互联网的运作,最根本的驱动就是信息的交互,NodeJS 在数据交互这一块做的很带感,异步编程让人很惬意,关于 NodeJS 的数据通信,最基础的两个模块是 NET 和 HTTP,前者是基于 TCP 的 ...

  9. Spark部署配置

    前提是已经安装了Hadoop ============================ SetUp Spark=============================Configuration sp ...

  10. 【Android】3.21 示例21—兴趣点收藏功能

    分类:C#.Android.VS2015.百度地图应用: 创建日期:2016-02-04 简介:介绍如何创建.管理本地收藏的兴趣点数据 详述: (1)新建本地点收藏: (2)查看已收藏本地点: (3) ...