From f02f578b3844fcc240c9ef94f5514b3e54b8e542 Mon Sep 17 00:00:00 2001 From: mr-xn Date: Wed, 30 Oct 2019 21:39:20 +0800 Subject: [PATCH] =?UTF-8?q?add=20crt.sh=E8=AF=81=E4=B9=A6=E6=94=B6?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + tools/crt.sh证书收集.py | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tools/crt.sh证书收集.py diff --git a/README.md b/README.md index 057fc2e..ffb3b3d 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ - [WAF Bypass](https://chybeta.gitbooks.io/waf-bypass/content/) - [命令注入总结](./tools/命令注入总结.md) - [隐藏wifi-ssid获取 · theKingOfNight's Blog](./tools/隐藏wifi-ssid获取%20·%20theKingOfNight's%20Blog.pdf) +- [crt.sh证书/域名收集](./tools/crt.sh证书收集.py) ## 说明 diff --git a/tools/crt.sh证书收集.py b/tools/crt.sh证书收集.py new file mode 100644 index 0000000..836fca1 --- /dev/null +++ b/tools/crt.sh证书收集.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# @Time : 2019-10-08 22:51 +# @Author : Patrilic +# @FileName: SSL_subdomain.py +# @Software: PyCharm + +import requests +import re + +TIME_OUT = 60 + + +def get_SSL(domain): + domains = [] + url = 'https://crt.sh/?q=%25.{}'.format(domain) + response = requests.get(url, timeout=TIME_OUT) + # print(response.text) + ssl = re.findall("(.*?).{}".format(domain), response.text) + for i in ssl: + i += '.' + domain + domains.append(i) + print(domains) + + +if __name__ == '__main__': + get_SSL("baidu.com") \ No newline at end of file