elceef / dnstwist

Domain name permutation engine for detecting homograph phishing attacks, typo squatting, and brand impersonation
https://dnstwist.it
Apache License 2.0
4.9k stars 773 forks source link

Add installation instructions for OS X #29

Closed ream88 closed 8 years ago

ream88 commented 8 years ago

Once https://github.com/Homebrew/homebrew/pull/45806 is pulled in, we can add instructions how to install dnstwist on OS X via the de facto standard package manager Homebrew.

I also wrote a blog post how easy it was to follow your code and write a Homebrew formula for it: https://medium.com/@ream88/you-should-write-homebrew-formulae-87af83f69df5

ream88 commented 8 years ago

The pull request was accepted :smile: We can now add OS X instructions for this amazing tool!

elceef commented 8 years ago

Thank you!

elceef commented 8 years ago

A friend of mine has noticed that dnstwist reports ssdeep module missing. Could you please take a look into this?

ream88 commented 8 years ago

This line should install ssdeep for them.

elceef commented 8 years ago

Yes, and it does indeed.

$ brew install dnstwist
==> Installing dependencies for dnstwist: ssdeep, geoip
==> Installing dnstwist dependency: ssdeep
==> Downloading https://homebrew.bintray.com/bottles/ssdeep-2.13.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ssdeep-2.13.yosemite.bottle.tar.gz

However dnstwist encounters ImportError exception when importing ssdeep module (which is a wrapper for ssdeep binary). I think brew installs wrong ssdeep package.

ream88 commented 8 years ago

It works for me…

==> Installing dependencies for dnstwist: ssdeep
==> Installing dnstwist dependency: ssdeep
==> Downloading https://homebrew.bintray.com/bottles/ssdeep-2.13.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/ssdeep-2.13.el_capitan.bottle.tar.gz
==> Pouring ssdeep-2.13.el_capitan.bottle.tar.gz
dnstwist -s mariouher.com
     _           _            _     _   
  __| |_ __  ___| |___      _(_)___| |_ 
 / _` | '_ \/ __| __\ \ /\ / / / __| __|
| (_| | | | \__ \ |_ \ V  V /| \__ \ |_ 
 \__,_|_| |_|___/\__| \_/\_/ |_|___/\__| {1.01}

Fetching content from: http://mariouher.com ... 200 OK (0.9 Kbytes)
Processing 207 domain variants ... 2 hits (0%)
elceef commented 8 years ago

Homebrew formula defines the following resource:

  resource "ssdeep" do
    url "https://pypi.python.org/packages/source/s/ssdeep/ssdeep-3.1.1.tar.gz"
    sha256 "a6c66309e6b540d5c8ba08c018675dabaef2172f2cc6f6351b67395ba7bf2ddd"
  end

Which is different from the one being actually installed:

Downloading https://homebrew.bintray.com/bottles/ssdeep-2.13.el_capitan.bottle.tar.gz

The package that was downloaded is ssdeep binary without python ssdeep wrapper module which is required by dnstwist. My guess is that you have this python wrapper for ssdeep already installed, but the friend of mine does not.

ream88 commented 8 years ago

You need both your ssdeep binaries and the ssdeep wrapper for Python. Both dependencies should be met by depending on "ssdeep" and downloading the resource above.

Does your friend have any error output I can inspect?

elceef commented 8 years ago

He runs OSX Yosemite. No errors during brew install.

ream88 commented 8 years ago

Weird, however the formula was tested way back to 10.9 and worked fine. Maybe it's his particular setup.

ream88 commented 8 years ago

This is the CI for OS X 10.10 a.k.a. Yosemite: https://travis-ci.org/Homebrew/homebrew/jobs/89991890