首页>源码>python>Android-app-traffic-IPsec

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隧道流量并进行包过滤的简易脚本
电信网络下载

访问申明(访问视为同意此申明)

1.在网站平台的任何操作视为已阅读和同意网站底部的版权及免责申明
2.部分网络用户分享TXT文件内容为网盘地址有可能会失效(此类多为视频教程,如发生失效情况【联系客服】自助退回)
3.请多看看评论和内容介绍大数据情况下资源并不能保证每一条都是完美的资源
4.是否访问均为用户自主行为,本站只提供搜索服务不提供技术支持,感谢您的支持
意见反馈 联系客服 返回顶部

登录注册找回密码

捐赠账单

*支付宝与微信两种方式二选一

*请依据自身情况量力选择捐赠类型并点击“确认”按钮

*依据中国相关法规,捐赠金额平台将不予提供发票

*感谢您的捐赠,我们竭诚为您提供更好的搜索服务

*本着平台非营利,请自主选择捐赠或分享资源获得积分

*您的捐赠仅代表平台的搜索服务费,如有疑问请通过联系客服反馈

*推荐用chrome浏览器访问本站,禁用360/Edge浏览器

*请务必认真阅读上诉声明,捐赠视为理解同意上诉声明

账号剩余积分: 0
啥都没有哦