修复收集到的域名有逗号等非法子域问题

This commit is contained in:
Jing Ling
2020-09-10 22:52:59 +08:00
parent badaa3c595
commit 92e0833a79
+4 -3
View File
@@ -25,8 +25,9 @@ class RiskIQ(Query):
if not resp: if not resp:
return return
data = resp.json() data = resp.json()
names = data.get('subdomains') subnames = data.get('subdomains')
self.subdomains = set(map(lambda sub: f'{sub}.{self.domain}', names)) subdomain_str = str(set(map(lambda subname: f'{subname}.{self.domain}', subnames)))
self.subdomains = self.collect_subdomains(subdomain_str)
def run(self): def run(self):
""" """
@@ -53,4 +54,4 @@ def run(domain):
if __name__ == '__main__': if __name__ == '__main__':
run('example.com') run('alibabagroup.com')