Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudflare_api获取逻辑错误 #217

Open
spellman001 opened this issue Aug 7, 2021 · 1 comment
Open

cloudflare_api获取逻辑错误 #217

spellman001 opened this issue Aug 7, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@spellman001
Copy link

是否使用了最新代码

Bug描述
cloudflare_api 查询逻辑有问题,36行开始首先对当前用户下的cloudflare 域进行查询
从40行开始判断resp["success"] 以及resp["result"] 满足这种条件需要在cloudflare中无zones绑定记录
如果通过oneforall或者cloudflare创建过zones绑定记录就会触发46行的分支条件,问题出在47行因为如果创建过zone绑定,在通过api创建会提示已经创建,oneforall将无法获取zone_id,
修复应替换47行为 zone_id = zones_resp.json()["result"][0]["id"]

运行环境

  • 系统:Windows 10 x64 WSL(ubuntu 20.0.4)
  • Python版本:3.8.5
  • OneForAll版本:v0.4.3 #dev

如何复现
复现步骤(选写)
同一个域名使用cloudflareapi 模块查询两次,第一次有找到子域,之后的将无法查询到

复现命令
python3 oneforall.py --target baidu.com run

其他补充
替换47行只是临时解决,解决问题应该还是要添加delete zones api的支撑。

@spellman001 spellman001 added the bug Something isn't working label Aug 7, 2021
@shmilylty
Copy link
Owner

收到 我先看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants