diff --git a/requirements.txt b/requirements.txt index 288cb5b..db86d75 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,9 @@ flask-wtf rq redis pypssl +pypdns +pyeupi +dnspython +bgpranking-web +urlquery +beautifulsoup4 diff --git a/update_deps.sh b/update_deps.sh index 872668c..c57a26e 100755 --- a/update_deps.sh +++ b/update_deps.sh @@ -5,8 +5,8 @@ set -x DEST_DIR="web/static/" -ANGULAR='1.3.15' -ANGULAR_BOOTSTRAP='0.13.0' +ANGULAR='1.4.5' +ANGULAR_BOOTSTRAP='0.13.4' wget https://ajax.googleapis.com/ajax/libs/angularjs/${ANGULAR}/angular.min.js -O ${DEST_DIR}/angular.min.js wget https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-${ANGULAR_BOOTSTRAP}.min.js -O ${DEST_DIR}/ui-bootstrap-tpls.min.js diff --git a/url_abuse_async.py b/url_abuse_async.py index 5e88c4c..5822a1b 100644 --- a/url_abuse_async.py +++ b/url_abuse_async.py @@ -166,7 +166,7 @@ def get_urls(url, depth=1): def meta_redirect(content): c = content.lower() - soup = BeautifulSoup(c) + soup = BeautifulSoup(c, "html.parser") for result in soup.find_all(attrs={'http-equiv': 'refresh'}): if result: out = result["content"].split(";") @@ -441,7 +441,13 @@ def psslcircl(url, user, passwd, q): psslcircl = PyPSSL(url, basic_auth=(user, passwd)) response = psslcircl.query(q) if response.get(q) is not None: - entries = response[q] + certinfo = response.get(q) + entries = {} + for sha1 in certinfo['certificates']: + entries[sha1] = [] + if certinfo['subjects'].get(sha1): + for value in certinfo['subjects'][sha1]['values']: + entries[sha1].append(value) _cache_set(q, entries, 'pssl') return entries return None diff --git a/web/static/main.js b/web/static/main.js index 3ace342..eb6fb3c 100644 --- a/web/static/main.js +++ b/web/static/main.js @@ -279,7 +279,7 @@ }; globFct.query('psslcircl', {"query": scope.query}, get_response); }, - template: '
SSL certificates related to this IP:
' + template: '
SSL certificates related to this IP:
' }; }); app.directive('uqBgpranking', function(globFct) {