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

Output for elasticsearch v6+ #253

Closed superhuahua closed 6 years ago

superhuahua commented 6 years ago

when I want to save result for elastic stack, I use ./whatweb [host]--log-elastic-host=localhost:9200 , but I get error message:

{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

According to the message, edit file lib/output.rb and add req.add_field('Content-Type', 'application/json') in line 960 of the file will fix this error.

urbanadventurer commented 6 years ago

Thanks @superhuahua for reporting this issue and providing a fix.