httpry:HTTP日志和信息检索工具

httpry是一个设计用于显示和记录HTTP流量的工具。它的目的不是为了执行分析本身,而是为了捕捉、解析和/或记录流量,以便日后分析。它可以实时运行,显示网上的实时流量,也可以作为一个守护进程,记录到一个输出文件。它被写成尽可能的轻量级和灵活,所以它可以很容易地适应不同的应用。它不显示传输的原始HTTP数据,而是专注于解析和显示请求/响应行以及相关的头域。

功能:

> 查看你的网络上的用户正在网上浏览什么内容
> 检查服务器配置是否正确(或不正确,视情况而定)
> 研究HTTP使用的模式
> 观察是否有危险的下载文件
> 验证网络中HTTP策略的执行情况
> 从保存的捕获文件中提取HTTP统计数据
> 实时观察只是普通的乐趣

使用方法:

httpry [ -dFhpqs ] [ -b file ] [ -f format ] [ -i device ] [ -l threshold ]
       [ -m methods ] [ -n count ] [ -o file ] [ -P file ] [ -r file ]
       [ -S bytes ] [ -t seconds ] [ -u user ] [ 'expression' ]
-b file
将所有处理过的 HTTP 数据包写入二进制 pcap 转储文件。对于进一步分析记录的数据很有用。

-d
作为一个守护进程运行该程序。所有的程序状态输出都将被发送到 syslog。默认情况下,会在 /var/run/httpry.pid 中为该进程创建一个 pid 文件。需要一个用-o指定的输出文件。

-f format
提供一个以逗号分隔的字符串,指定要输出的解析的HTTP数据。有关可用选项和语法的进一步信息,请参见doc/format-string文件。

-F
禁用所有输出缓冲。当用管道将httpry输出引入另一个程序时,这可能会有帮助。

-h
Display a brief summary of these options.

-i device
指定一个以太网接口供程序监听。如果不指定,程序将轮询系统中的接口列表,并选择第一个发现的接口。

-l threshold
在速率统计模式(-s)下运行时,指定每秒请求数的阈值。只有rps值大于或等于这个数字的主机才会被显示。默认值为1。

-m methods
Provide a comma-delimited string that specifies the request methods to parse.
The program defaults to parsing all of the standard RFC2616 method strings if
this option is not set. See the doc/method-string file for more information.

-n count
Parse this number of HTTP packets and then exit. Defaults to 0, which means
loop forever.

-o file
Specify an output file for writing parsed packet data.

-p
Do not put the NIC in promiscuous mode on startup. Note that the NIC could
already be in that mode for another reason.

-P file
Specify a path and filename for creating the PID file in daemon mode.

-q
Suppress non-critical output (startup banner, statistics, etc.).

-r file
提供一个输入的捕获文件来读取,而不是进行实时捕获。这个选项不需要root权限。

-s
Run httpry in an HTTP request per second display mode. This periodically
displays the rate per active host and total rate at a specified interval.

-S
指定一个跳过以太网头的字节数。这使得自定义头的偏移量得到了考虑。

-t seconds
在速率统计模式(-s)下运行时,指定主机统计数据的显示间隔,单位为秒。默认为5秒。

-u user
指定一个备用用户来接管该进程和任何输出文件的所有权。你将需要root权限来做这件事;在初始化后,它将切换到新的用户。

'expression'
Specify a bpf-style capture filter, overriding the default. Here are a few
basic examples, starting with the default filter:

 'tcp port 80 or 8080'
 'tcp dst port 80'
 'tcp dst port 80 and src host 192.168.1.1'

官方网站:
https://github.com/jbittel/httpry
https://dumpsterventures.com/jason/httpry/

如若转载,请注明出处:https://www.ouq.net/httpry.html

(1)
打赏 微信打赏,为服务器增加50M流量 微信打赏,为服务器增加50M流量 支付宝打赏,为服务器增加50M流量 支付宝打赏,为服务器增加50M流量
上一篇 04/21/2022
下一篇 04/23/2022

相关推荐