如何使用Scapy发送TLS ClientHello?

2024-03-19 11:53:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将TLS ClientHello数据包发送到带有SNI的IP,以检查防火墙是否返回RST数据包。我应该如何在脚本中与scapy一起这样做

我试过这个:

from scapy.layers.tls.automaton_cli import TLSClientAutomaton

def tls_check(domain):
    t=TLSClientAutomaton(server="1.1.1.1",dport=443,server_name=domain)
    t.run()
tls_check("1337x.to")

虽然它做了一些工作,但它表明连接正在被重置。问题是它输出到控制台

enter image description here

假设我想看看是否在变量中重置连接。我该怎么办?我只需要发送ClientHello数据包并检查连接是否被重置,不需要完全握手

谢谢


Tags: ip脚本serverdomainchecktlsrst数据包