我想向路由器发送一个简单的SYN请求以获取ACK响应,以尝试使用python和scapy学习网络(TCP / IP)。
但是,scapy需要很长时间才能得到答案。
脚本-
#!/usr/bin/env python
from scapy.all import *
pack=TCP(sport=22,dport=80,flags='S')/IP(src="192.168.0.13",dst="192.168.0.1")
# tried with retry and timeout options using both sr() and sr1()
# but it comes with no answer from the router.
# ran this with sudo and iptables policy is default [ACCEPT]
ans = sr1(pack)
有什么解决方案?