Skip to content

Commit

Permalink
Merge branch 'master' into analysis-view
Browse files Browse the repository at this point in the history
# Conflicts:
#	dnstwister/__init__.py
#	dnstwister/static/build.py
  • Loading branch information
thisismyrobot committed Jun 25, 2016
2 parents c9554b0 + 5bc95ef commit 02567c1
Show file tree
Hide file tree
Showing 15 changed files with 286 additions and 197 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ resolvers/dnsresolve*
.cache/
brand/*.psd
_build*
.coverage
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
language: python
python:
- "2.7"
install: "pip install -r requirements.txt"
script: py.test
install:
- pip install -r requirements.txt
- pip install pytest-cov
script: py.test --cov=dnstwister
after_success:
- pip install python-coveralls
- coveralls -i
3 changes: 0 additions & 3 deletions dnstwister/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import flask.ext.cache

import mail.sendgridservice
import payment.stripeservice
import storage.pg_database


Expand All @@ -12,7 +11,6 @@
cache = flask.ext.cache.Cache(app, config={'CACHE_TYPE': 'simple'})
db = storage.pg_database.PGDatabase()
emailer = mail.sendgridservice.SGSender()
gateway = payment.stripeservice.StripeService()

# Blueprints
import api
Expand All @@ -28,4 +26,3 @@
import views.www.index
import views.www.search
import views.www.status
import views.www.whois
14 changes: 9 additions & 5 deletions dnstwister/dnstwist/dnstwist.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Expand All @@ -19,20 +19,24 @@

#
# dnstwist 1.02 modified by Robert Wallhead (robert@thisismyrobot.com) for use
# in https://dnstwist.herokuapp.com - all functionality except fuzzing removed
# and various changes made to allow usage in Google App Engine.
# in https://dnstwister.report - all functionality except fuzzing removed and
# various changes made to allow usage in Heroku.
#

__author__ = 'Marcin Ulikowski'
__version__ = '1.02'
__email__ = 'marcin@ulikowski.pl'

import re
import sys
import os.path


FILE_TLD = os.path.join('dnstwist', 'database', 'effective_tld_names.dat')
FILE_TLD = os.path.join(
'dnstwister',
'dnstwist',
'database',
'effective_tld_names.dat'
)
DB_TLD = os.path.exists(FILE_TLD)


Expand Down
1 change: 0 additions & 1 deletion dnstwister/payment/__init__.py

This file was deleted.

47 changes: 0 additions & 47 deletions dnstwister/payment/stripeservice.py

This file was deleted.

5 changes: 0 additions & 5 deletions dnstwister/static/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
'common.css',
'index.css',
),
'whois.min.css': (
'normalize.css',
'skeleton.css',
'common.css',
),
'analyse.min.css': (
'normalize.css',
'skeleton.css',
Expand Down
1 change: 0 additions & 1 deletion dnstwister/static/whois.min.css

This file was deleted.

4 changes: 0 additions & 4 deletions dnstwister/storage/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@ class IKeyValueDB(zope.interface.Interface):
"""Interface for a key-value storage."""
def set(self, key, value):
"""Set the value for key"""
pass

def get(self, key):
"""Get a value for key or None."""
pass

def ikeys(self, prefix=''):
"""Return an iterator of all keys, optionally filtered on prefix."""
pass

def delete(self, key):
"""Delete a key."""
pass


def instance_valid(instance):
Expand Down
15 changes: 0 additions & 15 deletions dnstwister/templates/www/whois.html

This file was deleted.

9 changes: 0 additions & 9 deletions dnstwister/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from dnstwister import cache
import dnstwister.dnstwist as dnstwist
import dnstwister.whois as whois


RESOLVER = dns.resolver.Resolver()
Expand Down Expand Up @@ -129,14 +128,6 @@ def resolve(domain):
return False, True


def whois_query(domain):
"""Returns the whois info for a domain or None."""
try:
return whois.lookup(domain)
except:
return 'Error: whois lookup failed'


def random_id(n_bytes=32):
"""Generate a random id for an email subscription (for instance)."""
return binascii.hexlify(os.urandom(n_bytes))
Expand Down
2 changes: 1 addition & 1 deletion dnstwister/views/www/email.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Email pages."""
import flask

from dnstwister import app, emailer, gateway, repository
from dnstwister import app, emailer, repository
import dnstwister.tools as tools
import dnstwister.tools.email as email_tools

Expand Down
17 changes: 0 additions & 17 deletions dnstwister/views/www/whois.py

This file was deleted.

87 changes: 0 additions & 87 deletions dnstwister/whois.py

This file was deleted.

0 comments on commit 02567c1

Please sign in to comment.