scapy

Scapy install issues. Nothing seems to actually be installed?

耗尽温柔 提交于 2019-12-02 23:19:37
I have an apple computer running Leopard with python 2.6. I downloaded the latest version of scapy and ran " python setup.py install ". All went according to plan. Now, when I try to run it in interactive mode by just typing "scapy", it throws a bunch of errors. What gives! Just in case, here is the FULL error message.. INFO: Can't import python gnuplot wrapper . Won't be able to plot. INFO: Can't import PyX. Won't be able to use psdump() or pdfdump(). ERROR: Unable to import pcap module: No module named pcap/No module named pcapy ERROR: Unable to import dnet module: No module named dnet

用Python和Scapy实现traceroute路由追踪

匿名 (未验证) 提交于 2019-12-02 22:51:30
windows10 python3.6.1 pycharm2018 scapy2.4.2 Graphviz和ImageMagick的应用程序,而非python的模块 直接pip install scapy即可 Graphviz的windows msi安装包如下,linux自己去Graphviz官网解决 https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi ImageMagick的windows msi安装包如下,linux自己去ImageMagick官网解决 https://imagemagick.org/download/binaries/ 笔者的ImageMagick版本为:ImageMagick-7.0.8-34-Q16-x64-dll.exe 注:链接进不去的话搭配请搭配梯子 分别给Graphviz和ImageMagick添加环境变量 这点很重要!!!!没有添加的话将无法使用traceroute中的graph函数绘制追踪图。 笔者添加的Graphviz的环境变量路径如下 C:\Program Files (x86)\Graphviz2.38\bin 笔者添加的ImageMagick的环境变量路径 C:\Program Files\ImageMagick-7.0.8-Q16 直接上代码:

How to set TCP options (Timestamp and SAckOk) via Scapy?

偶尔善良 提交于 2019-12-02 19:27:35
问题 I have following information for each packet I want to generate via Scapy, it is tcpdump output: 1509472682.813373 MAC1 > MAC2, ethertype IPv4 (0x0800), length 74: (tos 0x0, ttl 64, id 64271, offset 0, flags [DF], proto TCP (6), length 60) IP1.port1 > IP2.port2: Flags [S], cksum 0x4a0b (incorrect -> 0xe5b4), seq 1763588570, win 65535, options [mss 1460,sackOK,TS val 1098453 ecr 0,nop,wscale 6], length 0 I have generated TCP packets as follow, but when I check them via wireshark it seems that

scapy packet manipulation and original pkt.time

孤者浪人 提交于 2019-12-02 09:49:41
问题 I have python, scapy peace of code that store my data into database (IP src and dst, ports, ..) which i use for some statistics. On some packets i am doing some manipulation (changing dst port) and then send them back out on interface. Problem is that this packet i was manipulating with have different pkt.time value than original one and if I store those packets into database they have different packet time then they have originally. Is there and option within creating UDP packet to put

Decode RTP over UDP with Scapy

孤人 提交于 2019-12-02 09:44:04
问题 How can I decode (and manipulate) RTP over UDP with Scapy 2.3.2? I have a capture file called rtp.pcap which contains an RTP audiostream to 224.0.1.11:5016. Wireshark correctly decodes the stream when you enable the RTP over UDP protocol (default off). However, I want to do automatic packet manipulation, so I would like to decode it with Scapy. Currently, Scapy does not recognize RTP, although there is an RTP layer: >>> from scapy.all import RTP # shows that RTP layer is installed in my

Scapy sniff the packet multiple times?

北战南征 提交于 2019-12-02 09:43:59
问题 I am using Scapy to capture packets by using the following code from scapy.all import * def verify(p): p.display() sniff(prn=verify, iface="lo") The sniff function captures every packet multiple times. For example, if I have a DNS query packet, this packet will display two times. How can make The sniff function to capture each packet only single time? 回答1: This is expected behavior. Scapy sees the packets on the loopback interface both when they "leave" and when they "arrive." So everything

scapy packet manipulation and original pkt.time

社会主义新天地 提交于 2019-12-02 07:01:17
I have python, scapy peace of code that store my data into database (IP src and dst, ports, ..) which i use for some statistics. On some packets i am doing some manipulation (changing dst port) and then send them back out on interface. Problem is that this packet i was manipulating with have different pkt.time value than original one and if I store those packets into database they have different packet time then they have originally. Is there and option within creating UDP packet to put original pkt.time value? With this option packet manipulation delay would not cause disorder with my packets

Decode RTP over UDP with Scapy

爱⌒轻易说出口 提交于 2019-12-02 06:28:51
How can I decode (and manipulate) RTP over UDP with Scapy 2.3.2? I have a capture file called rtp.pcap which contains an RTP audiostream to 224.0.1.11:5016. Wireshark correctly decodes the stream when you enable the RTP over UDP protocol (default off). However, I want to do automatic packet manipulation, so I would like to decode it with Scapy. Currently, Scapy does not recognize RTP, although there is an RTP layer: >>> from scapy.all import RTP # shows that RTP layer is installed in my version >>> pkts = sniff(offline="rtp.pcap", filter="udp dst port 5016") >>> pkts[0].show() [...] ###[ UDP ]

Scapy sniff the packet multiple times?

守給你的承諾、 提交于 2019-12-02 05:47:41
I am using Scapy to capture packets by using the following code from scapy.all import * def verify(p): p.display() sniff(prn=verify, iface="lo") The sniff function captures every packet multiple times. For example, if I have a DNS query packet, this packet will display two times. How can make The sniff function to capture each packet only single time? This is expected behavior. Scapy sees the packets on the loopback interface both when they "leave" and when they "arrive." So everything is duplicated with no distinction, because loopback is a special interface. Perhaps you should yourself just

python scapy模块的安装(mac)

橙三吉。 提交于 2019-12-02 05:37:22
1、查看Scapy存储库的克隆(下载scapy) git clone https://github.com/secdev/scapy 2、进入下载的包 cd scapy 3、安装 sudo python setup.py install 输入电脑登录密码,等待自动安装。。。。结束。 一般到这里就完了,不过如果后面不是最新的,可以执行后面步骤: git pull sudo python setup.py install 来源: https://blog.csdn.net/zuohang247/article/details/102723304