urbanadventurer / WhatWeb

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

WhatWeb scan not working any ideas? #365

Closed serber1990 closed 3 years ago

serber1990 commented 3 years ago

Hello,

I'm trying to do a scan on any website and I get this error that many others already had:

_#<Thread:0x000055f8cd2791a8 /usr/lib/ruby/vendor_ruby/whatweb/scan.rb:41 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 5723: from /usr/lib/ruby/vendor_ruby/whatweb/scan.rb:43:in block (2 levels) in scan' 5722: from /usr/lib/ruby/vendor_ruby/whatweb/scan.rb:43:inloop' 5721: from /usr/lib/ruby/vendor_ruby/whatweb/scan.rb:50:in block (3 levels) in scan' 5720: from /usr/lib/ruby/vendor_ruby/target.rb:210:inopen' 5719: from /usr/lib/ruby/vendor_ruby/target.rb:267:in open_url' 5718: from /usr/lib/ruby/2.7.0/resolv.rb:44:ingetaddress' 5717: from /usr/lib/ruby/2.7.0/resolv.rb:93:in getaddress' 5716: from /usr/lib/ruby/2.7.0/resolv.rb:115:ineach_address' ... 5711 levels... 4: from /usr/lib/ruby/2.7.0/resolv.rb:1124:in block (3 levels) in resolv' 3: from /usr/lib/ruby/2.7.0/resolv.rb:527:inblock in fetch_resource' 2: from /usr/lib/ruby/2.7.0/resolv.rb:770:in sender' 1: from /usr/lib/ruby/2.7.0/resolv.rb:735:inlazy_initialize' /usr/lib/ruby/2.7.0/resolv.rb:735:in synchronize': stack level too deep (SystemStackError) Traceback (most recent call last): 5723: from /usr/lib/ruby/vendor_ruby/whatweb/scan.rb:43:inblock (2 levels) in scan' 5722: from /usr/lib/ruby/vendor_ruby/whatweb/scan.rb:43:in loop' 5721: from /usr/lib/ruby/vendor_ruby/whatweb/scan.rb:50:inblock (3 levels) in scan' 5720: from /usr/lib/ruby/vendor_ruby/target.rb:210:in open' 5719: from /usr/lib/ruby/vendor_ruby/target.rb:267:inopen_url' 5718: from /usr/lib/ruby/2.7.0/resolv.rb:44:in getaddress' 5717: from /usr/lib/ruby/2.7.0/resolv.rb:93:ingetaddress' 5716: from /usr/lib/ruby/2.7.0/resolv.rb:115:in each_address' ... 5711 levels... 4: from /usr/lib/ruby/2.7.0/resolv.rb:1124:inblock (3 levels) in resolv' 3: from /usr/lib/ruby/2.7.0/resolv.rb:527:in block in fetch_resource' 2: from /usr/lib/ruby/2.7.0/resolv.rb:770:insender' 1: from /usr/lib/ruby/2.7.0/resolv.rb:735:in lazy_initialize' /usr/lib/ruby/2.7.0/resolv.rb:735:insynchronize': stack level too deep (SystemStackError)_

I already tried doing:

-scans on google.com, facebook.com, reddit.com, among other sites.

-sudo

-doing it with root

-cloning it from GitHub

-updating and upgrading

-searched on google for the error with no luck

¿Can you please tell me how can I solve this issue?

urbanadventurer commented 3 years ago

I can see in your StackTrace that you are using Ruby 2.7.0 and from the file paths I assume you are using Linux. I haven't tested WhatWeb with Ruby v2.7.0 yet but it works well with Ruby 2.6.x.

To get it working, you could try using it from Kali Linux, as it is pre-installed and will work instantly. Alternatively, try using it with Ruby 2.6.5.

You could use rbenv to install a different version of Ruby for WhatWeb than for the rest of your system. In the meantime I will do some tests with Ruby 2.7.

urbanadventurer commented 3 years ago

Whatever is wrong, it isn't compatibility with version 2.7.1 of Ruby.

What OS or Distro are you using?

$ ./whatweb slashdot.org
http://slashdot.org [301 Moved Permanently] Country[UNITED STATES][US], HTTPServer[nginx], IP[216.105.38.15], Plex-Media-Server, RedirectLocation[https://slashdot.org/], Title[301 Moved Permanently], nginx
https://slashdot.org/ [200 OK] Country[UNITED STATES][US], Email[feedback@slashdot.org], Google-Analytics[UA-36136016-1], HTML5, HTTPServer[nginx], IP[216.105.38.15], Matomo, Open-Graph-Protocol[100000696822412], PasswordField[upasswd], Plex-Media-Server, Script[text/javascript,text/x-handlebars-template], Strict-Transport-Security[max-age=31536000], Title[Slashdot: News for nerds, stuff that matters], UncommonHeaders[slash_log_data,content-security-policy,x-xrds-location], probably WordPress, X-Frame-Options[SAMEORIGIN], X-UA-Compatible[IE=edge], nginx
$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin20]
serber1990 commented 3 years ago

Hello guys, thanks for your answers.

I'm using a fresh install of Kali Linux 2021.1 64bits up todate and working fine..

Whenever I try to scan my IP range from my router it works fine, but with any DNS it throws that error.

I'm going to try to install ruby 2.6.x and give you an answer, but I'm not sure if I'll be able to install an older version of it.

BTW: I'm using a VM I don't know if thay may be a factor.

serber1990 commented 3 years ago

It is solved..

I did the update and upgrade of the system and never restarted my VM so it just needed a restart.

I'm really sorry to bother you guys.

Thank you very much for your help! I'll close this issue.