无法使用Scapy / kamene

时间:2019-10-18 11:22:05

标签: tcp reset scapy

最初,我通过终端从我的机器(A)建立了到机器(B)的ssh连接。 同时,我正在运行wireshark,并接收了从ssh协议收到的最后一个数据包 B到A并获得[3424808643]并设置新的RST数据包的序列号 为(3424808643)+(92)= 3424808735

我尝试使用以下代码使用scapy / kamene发送TCP RST数据包。

ip=IP(src=src,dst=dst)
RST_tcp=TCP(sport=56540,dport=22, flags="R", seq=3424808735)
print("RST sent from client")
sr1(ip/RST_tcp)

但是它给出以下错误输出。我正在使用Ubuntu

RST sent from client
Begin emission:
WARNING: DNS RR prematured end (ofs=16116, len=26)
WARNING:kamene.runtime:DNS RR prematured end (ofs=16116, len=26)
WARNING: wrong value: DNS.ancount=51411
WARNING:kamene.runtime:wrong value: DNS.ancount=51411
WARNING: wrong value: DNS.nscount=41893
WARNING:kamene.runtime:wrong value: DNS.nscount=41893
WARNING: more wrong value: DNS.arcount=778
WARNING:kamene.runtime:more wrong value: DNS.arcount=778
Finished to send 1 packets.
RST sent from client
..........................................................
..........................................................
WARNING: DNS RR prematured end (ofs=16116, len=26)
WARNING:kamene.runtime:DNS RR prematured end (ofs=16116, len=26)
WARNING: wrong value: DNS.ancount=51411
WARNING:kamene.runtime:wrong value: DNS.ancount=51411
WARNING: wrong value: DNS.nscount=41893
WARNING:kamene.runtime:wrong value: DNS.nscount=41893
WARNING: more wrong value: DNS.arcount=778
WARNING:kamene.runtime:more wrong value: DNS.arcount=778
..........................................................
..........................................................
..........................................................

0 个答案:

没有答案