urbanadventurer / WhatWeb

Next generation web scanner
https://www.morningstarsecurity.com/research/whatweb
GNU General Public License v2.0
5.2k stars 885 forks source link

Ubuntu 16.04: Install problem #305

Closed skramm closed 4 years ago

skramm commented 4 years ago

Machine: up-to-date Ubuntu 16.04

$ sudo apt install whatweb (goes on fine)

$ whatweb`
/usr/bin/whatweb: /usr/lib/ruby/vendor_ruby/rchardet/universaldetector.rb:39: invalid multibyte escape: /[\x80-\xFF]/ (SyntaxError)

`$ whatweb --version`
/usr/bin/whatweb: /usr/lib/ruby/vendor_ruby/rchardet/universaldetector.rb:39: invalid multibyte escape: /[\x80-\xFF]/ (SyntaxError)

And, in case this is useful (?) :

$ ruby --version
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

Any idea ?

urbanadventurer commented 4 years ago

This looks like a problem with the rchardet gem.

Try gem uninstall rchardet if you don't need this functionality, or alternatively update ruby.

skramm commented 4 years ago

Thanks. Did that (uninstall rcharget), now works fine. Sorry, but I'm a complete Ruby noob! The only issue left is a warning (here with --version but happens with whatever command):

$ whatweb --version
/usr/share/whatweb/lib/tld.rb:85: warning: key "2nd_level_registration" is duplicated and overwritten on line 85
/usr/share/whatweb/lib/tld.rb:93: warning: key "2nd_level_registration" is duplicated and overwritten on line 93
/usr/share/whatweb/lib/tld.rb:95: warning: key "2nd_level_registration" is duplicated and overwritten on line 95
WhatWeb version 0.4.8-dev ( http://www.morningstarsecurity.com/research/whatweb/ )

Probably unrelated, but who knows? If not, I'll close the issue.

urbanadventurer commented 4 years ago

I see you are using an old version of WhatWeb. Did you install it using a package management system like apt?

One of the more recent releases will be faster, have more features, plugins, etc. https://github.com/urbanadventurer/WhatWeb/releases

skramm commented 4 years ago

I see you are using an old version of WhatWeb. Did you install it using a package management system like apt?

Yep, as written in initial post ;-)

One of the more recent releases will be faster, have more features, plugins, etc. https://github.com/urbanadventurer/WhatWeb/releases

ok. So I first uninstalled previous version:

$ sudo apt-get remove whatweb
...
$ whatweb --version
bash: /usr/bin/whatweb: No such file or directory

Then fetched the latest tar.gz (0.5.1), untared, read the page: https://github.com/urbanadventurer/WhatWeb/wiki/Installation opened a shell into the folder, and here we go: (I gave the sudo passwd when requested)

$ sudo gem install bundler
Successfully installed bundler-2.1.4
Parsing documentation for bundler-2.1.4
Done installing documentation for bundler after 1 seconds
1 gem installed
$ bundle install
Using rake 13.0.1
Following files may not be writable, so sudo is needed:
  /usr/local/bin
  /var/lib/gems/2.3.0
  /var/lib/gems/2.3.0/build_info
  /var/lib/gems/2.3.0/cache
  /var/lib/gems/2.3.0/doc
  /var/lib/gems/2.3.0/extensions
  /var/lib/gems/2.3.0/gems
  /var/lib/gems/2.3.0/specifications
Using public_suffix 4.0.5
Using addressable 2.7.0
Using ast 2.4.0
Using bundler 2.1.4
Using thor 0.20.3
Using bundler-audit 0.6.1
Using coderay 1.1.2
Using ipaddr 1.2.2
Using jaro_winkler 1.5.4
Using json 2.3.0
Using method_source 1.0.0
Using minitest 5.14.1
Using parallel 1.19.1
Using parser 2.7.1.2
Using pry 0.13.1
Using rainbow 3.0.0
Using rb-readline 0.5.5
Using rdoc 6.2.0
Using rexml 3.2.4
Using ruby-progressbar 1.10.1
Using unicode-display_width 1.7.0
Using rubocop 0.81.0
Bundle complete! 10 Gemfile dependencies, 23 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

But:

$ bundle info whatweb
Could not find gem 'whatweb'.

However, the one in current folder works:

$ ./whatweb --version
WhatWeb version 0.5.1 ( https://www.morningstarsecurity.com/research/whatweb/ )

Maybe there are some clarifications needed in the install process ?(again, I hav no Ruby background at all, I have no idea what this "bundle" command does) Or did I misread something ?

Anyway, big thanks for what seems to be a great tool !