我如何在mac x上安装ngrep?我试过喝啤酒,但没有用.当我使用ngrep时,它会给我带来错误,但当我使用sngrep时,它会给我带来更多的错误):(看起来是进步了)
Unable to handle linktype 149
With command
sudo sngrep -d any '.flv' port 80
With ngrep error:
interface: any
exit
0 received, 0 dropped
我能做些什么来解决这个问题?
我正在尝试编译一个名为ngrep的程序,当我运行configure时,一切似乎都很顺利,但当我运行make时,我得到:
ngrep.c: In function ‘process’:
ngrep.c:544: error: ‘struct udphdr’ has no member named ‘source’
ngrep.c:545: error: ‘struct udphdr’ has no member named ‘dest’
make: *** [ngrep.o] Error 1
这意味着什么,我该如何修复它?没有早期的警告
Im在一个CentOS Linux版本7.1.1503上。我希望在端口8058上以明文打印所有通信,并为此运行以下命令:
sudo ngrep -pqtW byline port 8058
但是,运行上面的命令会给出以下错误:
SIOCGIFADDR: nflog: No such device: No such device
interface: nflog
pcap compile: NFLOG link-layer type filtering not implemented
我输入的命令正确是什么意思?
谢谢
我很好奇ngrep是否能根据端口进行倒置匹配?我试过这样的方法:
ngrep -d any -v port 22
interface: any
filter: ( port 22 ) and (ip or ip6)
虽然它说过滤器是为‘端口22',但它没有拾取任何端口。在谷歌上搜索了几天,但还没有找到解决方案。任何熟悉ngrep的人能让我知道这是否可行吗?
我每天编写一个脚本来捕获ngrep日志。但是,当日期被更改时,它不会自动创建文件。
#!/bin/bash
month=$( date +%B )
mkdir -p /home/log/$month
NOW=$(date '+%Y%m%d')
LOGFILE1="/home/log/$month/5110_$NOW.txt"
LOGFILE2="/home/log/$month/5150_$NOW.txt"
LOGFILE3="/home/log/$month/5160_$NOW.txt"
while true
do
n
引用手册页
match expression
A match expression is either an extended regular expression, or if the -X
option is specified, a string signifying a hexadecimal value. An extended
regular expression follows the rules as implemented by the GNU regex
library. Hexadecimal expressions can optional