Android-app-traffic-IPsec
声明:资源链接索引至第三方,平台不作任何存储,仅提供信息检索服务,若有版权问题,请https://help.coders100.com提交工单反馈
以下是一个简易脚本,用于在真机上采集IPSec隧道流量并进行包过滤。该脚本使用Python编写,需要安装`scapy`库。
```python
from scapy.all import *
import socket
# 定义IPSec隧道的源和目标IP地址
src_ip = "192.168.1.1"
dst_ip = "192.168.1.2"
# 定义IPSec隧道的端口号
port = 443
# 创建一个UDP数据包,包含源IP、目标IP、端口号和数据内容
payload = IP(src=src_ip, dst=dst_ip) / UDP()
payload.setsockopt(IPPROTO_TCP, TTL, 5000)
payload.setsockopt(IPPROTO_TCP, IP_TTL, 5000)
payload.setsockopt(IPPROTO_TCP, IP_HDRINCL, 1)
payload.setsockopt(IPPROTO_TCP, IP_OFFSET, 0)
payload.setsockopt(IPPROTO_TCP, IP_SACKETSIZE, 1460)
payload.setsockopt(IPPROTO_TCP, IP_SACK_TTL, 5000)
payload.setsockopt(IPPROTO_TCP, IP_SACK_PERM, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_RTHW, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_URG, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_SEQ, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_ACK, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_LIMIT, 100)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOW, 1000)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATE, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOW, 1000)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP一个辅助于在真机采集IPSec隧道流量并进行包过滤的简易脚本
```python
from scapy.all import *
import socket
# 定义IPSec隧道的源和目标IP地址
src_ip = "192.168.1.1"
dst_ip = "192.168.1.2"
# 定义IPSec隧道的端口号
port = 443
# 创建一个UDP数据包,包含源IP、目标IP、端口号和数据内容
payload = IP(src=src_ip, dst=dst_ip) / UDP()
payload.setsockopt(IPPROTO_TCP, TTL, 5000)
payload.setsockopt(IPPROTO_TCP, IP_TTL, 5000)
payload.setsockopt(IPPROTO_TCP, IP_HDRINCL, 1)
payload.setsockopt(IPPROTO_TCP, IP_OFFSET, 0)
payload.setsockopt(IPPROTO_TCP, IP_SACKETSIZE, 1460)
payload.setsockopt(IPPROTO_TCP, IP_SACK_TTL, 5000)
payload.setsockopt(IPPROTO_TCP, IP_SACK_PERM, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_RTHW, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_URG, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_SEQ, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_ACK, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_LIMIT, 100)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOW, 1000)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATE, 1)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOW, 1000)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP, IP_SACK_WINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEWINDOWUPDATEBITS, 128)
payload.setsockopt(IPPROTO_TCP一个辅助于在真机采集IPSec隧道流量并进行包过滤的简易脚本
-
MTFNN-CO
- 2024-11-24 12:08:43访问
- 积分:1
-
modest-py
- 2024-11-24 11:56:10访问
- 积分:1
-
fmiopendata
- 2024-11-24 11:55:43访问
- 积分:1
-
whitecat-console
- 2024-11-24 11:53:21访问
- 积分:1
-
plan_enumerator
- 2024-11-24 11:52:42访问
- 积分:1
-
python-vbr
- 2024-11-24 11:31:18访问
- 积分:1
-
pyVBRc
- 2024-11-24 11:30:38访问
- 积分:1
-
Inspection
- 2024-11-24 11:28:46访问
- 积分:1
-
WutheringWavesFPSUnlock
- 2024-11-24 11:25:41访问
- 积分:1
-
WordsGenerate
- 2024-11-24 11:00:03访问
- 积分:1
-
Awesome-Chinese-online-AI
- 2024-11-24 10:59:24访问
- 积分:1
-
ivcfmerge
- 2024-11-24 10:54:36访问
- 积分:1
-
IVContrast
- 2024-11-24 10:54:08访问
- 积分:1
-
deep_Mahalanobis_detector
- 2024-11-24 10:42:27访问
- 积分:1
-
mahjong
- 2024-11-24 10:41:53访问
- 积分:1
-
BatchCommandCopyOfPerforceHelixP4V
- 2024-11-24 10:32:11访问
- 积分:1
-
UpdateBpOem
- 2024-11-24 10:31:47访问
- 积分:1
-
Atmosperic_Report
- 2024-11-24 10:28:30访问
- 积分:1
-
gitlab2feishu
- 2024-11-24 10:25:40访问
- 积分:1
-
Data-acquisition
- 2024-11-24 10:21:18访问
- 积分:1
-
autokary4433
- 2024-11-24 10:17:29访问
- 积分:1
访问申明(访问视为同意此申明)
2.部分网络用户分享TXT文件内容为网盘地址有可能会失效(此类多为视频教程,如发生失效情况【联系客服】自助退回)
3.请多看看评论和内容介绍大数据情况下资源并不能保证每一条都是完美的资源
4.是否访问均为用户自主行为,本站只提供搜索服务不提供技术支持,感谢您的支持