commit
d24febd23c
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import os
|
||||
import requests
|
||||
import datetime
|
||||
|
||||
base_url="https://raw.githubusercontent.com/threatstop/crl-ocsp-whitelist/master/"
|
||||
uri_list=['crl-hostnames.txt','crl-ipv4.txt','crl-ipv6.txt','ocsp-hostnames.txt','ocsp-ipv4.txt','ocsp-ipv6.txt']
|
||||
dict=dict()
|
||||
dict['list']=list()
|
||||
def source_read_and_add(input_file):
|
||||
output_list=list()
|
||||
for item in input_file:
|
||||
item=item.rstrip()
|
||||
output_list.append(item)
|
||||
return output_list
|
||||
|
||||
|
||||
for uri in uri_list:
|
||||
url = base_url + uri
|
||||
r=requests.get(url)
|
||||
dict['list'] += source_read_and_add(r.text)
|
||||
|
||||
dict['type'] = "string"
|
||||
dict['matching_attributes']=["hostname","domain","ip-dst","ip-src","url", "domain|ip"]
|
||||
dict['name']="CRL Warninglist"
|
||||
dict['version']= int(datetime.date.today().strftime('%Y%m%d'))
|
||||
dict['description']="CRL Warninglist from threatstop (https://github.com/threatstop/crl-ocsp-whitelist/)"
|
||||
dict['list']=list(set(dict['list']))
|
||||
|
||||
print(json.dumps(dict))
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
import requests
|
||||
import datetime
|
||||
import json
|
||||
|
||||
json_output=dict()
|
||||
json_output['type']="hostname"
|
||||
json_output['name']="University domains"
|
||||
json_output['matching_attributes']=['hostname','domain','url','domain|ip']
|
||||
json_output['version']= int(datetime.date.today().strftime('%Y%m%d'))
|
||||
json_output['description']="List of University domains from https://raw.githubusercontent.com/Hipo/university-domains-list/master/world_universities_and_domains.json"
|
||||
json_output['list']=list()
|
||||
|
||||
|
||||
|
||||
url="https://raw.githubusercontent.com/Hipo/university-domains-list/master/world_universities_and_domains.json"
|
||||
university_list_file=requests.get(url)
|
||||
university_list_json=university_list_file.json()
|
||||
|
||||
for university in university_list_json:
|
||||
for domain in university.get('domains'):
|
||||
if domain not in json_output['list']:
|
||||
json_output['list'].append(domain)
|
||||
|
||||
print(json.dumps(json_output))
|
Loading…
Reference in New Issue