• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • bios
  • 系统安装
  • 系统进程
  • Windows
  • LINUX
  • RedHat/Centos
  • Ubuntu/Debian
  • Fedora
  • Solaris
  • 麒麟系统
  • 红旗Linux
  • 苹果MAC
  • 注册表
  • 其它系统
您的位置:首页 > 操作系统 >LINUX > 详解Linux系统中字符串搜索命令ngrep的用法

详解Linux系统中字符串搜索命令ngrep的用法

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-05-12

佚名 通过本文向大家介绍了ngrep kamailio,ngrep,linux命令大全详解,linux命令详解手册,linux cp命令详解等相关知识,希望对您有所帮助,也希望大家多多支持linkedu.com

ngrep 是grep的网络版,他力求更多的grep特征,用于搜寻指定的数据包。由于安装ngrep需用到ibpcap库, 所以支持大量的操作系统和网络协议,能识别TCP、UDP和ICMP包。

安装ngrep
下载地址

选项

-h     is help/usage
-V    is version information
-q    is be quiet (don't print packet reception hash marks)静默模式,如果没有此开关,未匹配的数据包都以“#”显示
-e    is show empty packets 显示空数据包
-i     is ignore case 忽略大小写
-v    is invert match 反转匹配
-R   is don't do privilege revocation logic
-x    is print in alternate hexdump format 以16进制格式显示
-X   is interpret match expression as hexadecimal 以16进制格式匹配
-w   is word-regex (expression must match as a word) 整字匹配
-p   is don't go into promiscuous mode 不使用混杂模式
-l     is make stdout line buffered
-D   is replay pcap_dumps with their recorded time intervals
-t     is print timestamp every time a packet is matched在每个匹配的包之前显示时间戳
-T    is print delta timestamp every time a packet is matched显示上一个匹配的数据包之间的时间间隔
-M   is don't do multi-line match (do single-line match instead)仅进行单行匹配
-I     is read packet stream from pcap format file pcap_dump 从文件中读取数据进行匹配
-O   is dump matched packets in pcap format to pcap_dump 将匹配的数据保存到文件
-n    is look at only num packets 仅捕获指定数目的数据包进行查看
-A   is dump num packets after a match匹配到数据包后Dump随后的指定数目的数据包
-s    is set the bpf caplen
-S   is set the limitlen on matched packets
-W  is set the dump format (normal, byline, single, none) 设置显示格式byline将解析包中的换行符
-c    is force the column width to the specified size 强制显示列的宽度
-P   is set the non-printable display char to what is specified
-F   is read the bpf filter from the specified file 使用文件中定义的bpf(Berkeley Packet Filter)
-N   is show sub protocol number 显示由IANA定义的子协议号
-d   is use specified device (index) instead of the pcap default


应用举例:

捕获所有post请求(加个-W byline 参数后,将解析包中的换行符):


</div>

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 详解Linux系统中字符串搜索命令ngrep的用法

相关文章

  • 2017-05-12Linux怎么开启tomcat中日志的gc设置?
  • 2017-05-12查看Linux系统版本信息的方法小结
  • 2017-05-12使用awk的next命令的方法
  • 2017-05-12在Linux中安装配置Postfix来搭建邮件发送服务
  • 2017-05-12Linux怎么使用命令查看文件指定行数的内容?
  • 2017-05-12Linux系统下如何制作Live USB?Linux系统下制作Live USB的方法
  • 2017-05-12Linux系统下OpenSSH的安装及基本配置文件详解
  • 2017-05-12Linux Container(LXC容器)的基本命令使用简介
  • 2017-05-12详解Linux中获取全球唯一标示符UUID的方法
  • 2017-05-12gsettings简介及常用操作介绍

文章分类

  • bios
  • 系统安装
  • 系统进程
  • Windows
  • LINUX
  • RedHat/Centos
  • Ubuntu/Debian
  • Fedora
  • Solaris
  • 麒麟系统
  • 红旗Linux
  • 苹果MAC
  • 注册表
  • 其它系统

最近更新的内容

    • Linux中文件系统的目录结构详细介绍
    • Linux系统中查看执行中的进程占用内存量的方法
    • ps命令显示uid而不是用户名如何解决?
    • Linux系统中iwconfig命令使用详解
    • Linux系统中的date时间日期命令使用教程
    • Linux系统的硬件设备驱动的底层结构讲解
    • Linux系统中vmstat的基本使用指南
    • 如何将Linux命令设置成键盘快捷键?
    • 简单了解Linux中用于配合管理定时任务的atrm与batch命令
    • Linux Kernel 4.5在3月15日发布最终版

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有