[英]scapy takes infinite time sending TCP SYN packet with no reply.
我想向路由器发送一个简单的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)
解决办法是什么 ?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.