- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我是 scapy 的新手,我正在尝试使用 sr
和 sr1
函数来了解它们的工作原理。
我试图制作以下数据包,我看到它发送了 1 个数据包,但它说它收到了 581 个数据包。谁能帮我理解为什么它显示收到了这么多数据包。
收到1373个包,得到0个回复,剩余1个包
>>> p=sr(IP(dst="192.168.25.1")/TCP(dport=23))
.Begin emission:
.....Finished to send 1 packets.
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^C
Received 581 packets, got 0 answers, remaining 1 packets
>>> p
(<Results: TCP:0 UDP:0 ICMP:0 Other:0>, <Unanswered: TCP:1 UDP:0 ICMP:0 Other:0>)
我的 TCPDump 输出没有显示它收到了这么多数据包。
最佳答案
sr()
和 sr1()
函数将发送一个数据包并在网络上监听 sr()< 的情况下的相应答案
, sr1()
将只等待一个答案。
收到但未回复的数据包是 Scapy 在寻找对原始数据包的响应时嗅探的数据包。我不确定在使用 Scapy 的同时使用 tcpdump
进行嗅探会如何影响您的结果 - 不确定内核会将数据包传递给哪个进程。
这是关于 Sending and Receiving with Scapy 的优秀教程来自 PacketGeek。
还要确保在解释器中使用各种 Scapy 函数的 __doc__
属性来获取相关文档。
>>> print sr1.__doc__
Send packets at layer 3 and return only the first answer
nofilter: put 1 to avoid use of bpf filters
retry: if positive, how many times to resend unanswered packets
if negative, how many times to retry when no more packets are answered
timeout: how much time to wait after the last packet has been sent
verbose: set verbosity level
multi: whether to accept multiple answers for the same stimulus
filter: provide a BPF filter
iface: listen answers only on the given interface
>>>
关于python - 新来的。试图理解 sr(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25980777/
我正在使用 Aspose.Cells(试用版)为 Java 解析 .xls (Excel) 文件。但是当我尝试加载文件时,它抛出了下面给出的异常: SEVERE: java.lang.IllegalS
我目前正在尝试更深入地学习 Emacs,以便我可以用我的 Emacs 做更多的事情,而不仅仅是简单的编辑内容...... 我正在取得良好的进展,目前我正在尝试根据自己的喜好配置“sr-speedbar
我正在关注来自 Microsoft site 的示例用于从文本文件中读取。他们说要这样做: class Test { public static void Main() {
我的数据是这样的 wavelength reflectance 341.6 2.48 343.6 2.58 344.7 2.37 346.3
我有一个已经建立的类的 div,我无法删除它,但我需要视觉阅读器和屏幕阅读器才能“阅读”内容。据我了解,sr-only是让屏幕阅读器只能阅读,我如何为屏幕阅读器和视觉阅读器开发它? I'm ba
当使用 sr() 或 srp() 函数时——Scapy 如何知道收到的数据包是对我发送的数据包的答复? 我编写了一个模仿 BACNet 的自定义协议(protocol)。我可以将 WHO_IS 数据包
我正在尝试使用 scapy 进行隐形 SYN 扫描。我在 scapy 中阅读 usage documantation关于 sr 功能。它应该对我发送的数据包做出响应。 例如,我尝试运行以下命令: >>
我是 scapy 的新手,我正在尝试使用 sr 和 sr1 函数来了解它们的工作原理。 我试图制作以下数据包,我看到它发送了 1 个数据包,但它说它收到了 581 个数据包。谁能帮我理解为什么它显示收
我目前正在研究相当基础的网络,我目前正在研究可靠传输的主题。我正在使用 Kurrose & Ross 的 Computer Networking 一书,其中两个复习问题如下: With the sel
我正在使用带 sr-speedbar 的 emacs,但无法控制它的宽度。当我调整 emacs 窗口大小时,sr-speedbar 总是随之扩展。我已经用 xemacs 和 emacs 试过了。 下面
我使用 sr-speedbar在 emacs 中。加载时,它以文件模式启动。然后我手动将其更改为缓冲区模式。因为我几乎总是使用缓冲区模式,所以我更愿意以这种模式启动它。但是,在谷歌搜索后我找不到任何方
我扩展了 Scapy 以支持新的测试协议(protocol)。我看到 sniff() 命令能够在我使用 bind_layers() 将 2 层拼接在一起后自动分解数据包。我期望这应该足以进行解剖。每当
在选择性重复协议(protocol)中,窗口大小必须小于或等于 SR 协议(protocol)的序列号空间大小的一半。为什么会这样,又如何? 最佳答案 因为接收方将无法区分旧数据包或新数据包。接收器根
首先让我解释一下我的目标。我正在努力实现的目标是提供一个输入 .wav 文件,将其发送到某种语音识别 API,然后返回一个带有转录的文本文件。我想到的应用程序非常简单。我不要求对它进行语法或标点符号解
我想显示我的产品列表,如下所示: Sr.No | Name | Type -------------------- 1 | aa | 2 2 | bb | 2 3 |
我正在尝试使用 bootstrap 格式化表单页面,一些输入有可见标签,而另一些则没有。根据bootstrap documentation (列大小调整部分)我必须包装在“行”类中以设置输入的大小,但
我想知道 sr() 和 sniff() 的区别我会清理自己:当我用 sr() 发送数据包然后打印答案时,它只给我一个数据包: Received 1 packets, got 1 answers, re
我正在尝试在 mapreduce 程序中使用 CoreNLP 项目来查找存储在 hbase 表中的大量文本的情绪。我正在使用 SR 解析器进行解析。模型文件存储在 /user/root/english
From MDN : In the example below, a button is styled to look like a typical "close" button, with an X
sr-only 类是做什么用的?重要还是我可以删除它?没有也可以正常工作。 这是我的例子: Departments Toggle Dropdown
我是一名优秀的程序员,十分优秀!