From bfb069509ec08d3047a2f256355e6e173de8906b Mon Sep 17 00:00:00 2001 From: shmilylty Date: Wed, 14 Aug 2019 16:13:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0subdomains=E4=B8=BANone?= =?UTF-8?q?=E6=83=85=E5=86=B5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oneforall/modules/datasets/ipv4info.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/oneforall/modules/datasets/ipv4info.py b/oneforall/modules/datasets/ipv4info.py index ea51a03..4f371f6 100644 --- a/oneforall/modules/datasets/ipv4info.py +++ b/oneforall/modules/datasets/ipv4info.py @@ -34,9 +34,10 @@ class IPv4InfoAPI(Query): self.subdomains = self.subdomains.union(subdomains_find) # 不直接使用subdomains是因为可能里面会出现不符合标准的子域名 subdomains = resp_json.get('Subdomains') - # ipv4info子域查询接口每次最多返回300个 用来判断是否还有下一页 - if len(subdomains) < 300: - break + if subdomains: + # ipv4info子域查询接口每次最多返回300个 用来判断是否还有下一页 + if len(subdomains) < 300: + break page += 1 if page >= 50: # ipv4info子域查询接口最多允许查询50页 break