mirror of
https://github.com/Mr-xn/Penetration_Testing_POC.git
synced 2025-12-07 18:21:01 +08:00
add crt.sh证书收集
This commit is contained in:
26
tools/crt.sh证书收集.py
Normal file
26
tools/crt.sh证书收集.py
Normal file
@@ -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("<TD>(.*?).{}</TD>".format(domain), response.text)
|
||||
for i in ssl:
|
||||
i += '.' + domain
|
||||
domains.append(i)
|
||||
print(domains)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
get_SSL("baidu.com")
|
||||
Reference in New Issue
Block a user