[英]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.