mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-24 14:32:57 +08:00
Update deps and remove the google certs module
This commit is contained in:
parent
951f567bab
commit
7b3a110e54
2 changed files with 2 additions and 40 deletions
|
@ -1,9 +1,9 @@
|
|||
beautifulsoup4==4.8.0
|
||||
censys==0.0.8
|
||||
chart-studio==1.0.0
|
||||
plotly==4.0.0
|
||||
plotly==4.1.0
|
||||
pytest==5.0.1
|
||||
PyYaml==5.1.1
|
||||
PyYaml==5.1.2
|
||||
requests==2.22.0
|
||||
shodan==1.14.0
|
||||
texttable==1.6.2
|
|
@ -1,38 +0,0 @@
|
|||
from theHarvester.lib.core import *
|
||||
import json
|
||||
import requests
|
||||
|
||||
|
||||
class SearchGoogleCertificates:
|
||||
# https://www.google.com/transparencyreport/api/v3/httpsreport/ct/certsearch?include_expired=true&include_subdomains=true&domain=
|
||||
def __init__(self, word, limit, start):
|
||||
self.word = word
|
||||
self.results = ""
|
||||
self.totalresults = ""
|
||||
self.server = 'www.google.com'
|
||||
self.quantity = '100'
|
||||
self.limit = limit
|
||||
self.counter = start
|
||||
|
||||
def do_search(self):
|
||||
try:
|
||||
urly = 'https://' + self.server + '/transparencyreport/api/v3/httpsreport/ct/certsearch?include_expired=true&include_subdomains=true&domain=' + self.word
|
||||
except Exception as e:
|
||||
print(e)
|
||||
try:
|
||||
headers = {'User-Agent': Core.get_user_agent()}
|
||||
r = requests.get(urly, headers=headers)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
self.results = r.text
|
||||
self.totalresults += self.results
|
||||
|
||||
def get_domains(self):
|
||||
domains = []
|
||||
rawres = json.loads(self.totalresults.split('\n', 2)[2])
|
||||
for array in rawres[0][1]:
|
||||
domains.append(array[1])
|
||||
return list(set(domains))
|
||||
|
||||
def process(self):
|
||||
self.do_search()
|
Loading…
Reference in a new issue